Skip to content

Update GraphiQL to use new API path #60

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Nov 14, 2024
Merged

Update GraphiQL to use new API path #60

merged 14 commits into from
Nov 14, 2024

Conversation

optionsome
Copy link
Member

No description provided.

@VillePihlava VillePihlava marked this pull request as ready for review November 13, 2024 10:06
Comment on lines 1 to 3
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this prevent graphiql from being indexed by search engines? I'm not sure if we want to prevent it or not.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both of these files were created when I initalized a new app with create react app in order to migrate to the new version. I removed this file now

Comment on lines 1 to 11
const reportWebVitals = onPerfEntry => {
if (onPerfEntry && onPerfEntry instanceof Function) {
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
getCLS(onPerfEntry);
getFID(onPerfEntry);
getFCP(onPerfEntry);
getLCP(onPerfEntry);
getTTFB(onPerfEntry);
});
}
};
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this do?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();

Both of these files were created when I initalized a new app with create react app in order to migrate to the new version. I removed this file now

@VillePihlava
Copy link
Contributor

I think the production API is used by default if the URL matches the production URL:

const [apiType, setApiType] = useState(
    location.state?.apiType ||
      (window.location.hostname === PRODUCTION_API_URL
        ? API_TYPE.PROD
        : API_TYPE.DEV),
  );

@optionsome optionsome merged commit 7acbea4 into master Nov 14, 2024
2 checks passed
@optionsome optionsome deleted the DT-6515 branch November 14, 2024 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants