Why is Apollo Studio unable to connect to my GraphQL endpoint?

Have more questions? Submit a request

When you first attempt to connect a GraphOS cloud router to your GraphQL endpoint, Studio might display an error like the following:

Endpoints need to be available on the public internet. Please deploy your API before continuing.

Additionally, messages like the following might appear in your browser's developer console:

⚠️ Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:9000/. (Reason: CORS header 'Access-Control-Allow-Origin' missing). Status code: 204.
⚠️ Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:9000/.
(Reason: CORS request did not succeed). Status code: (null).

Errors like these are usually related to Cross-Origin Resource Sharing (CORS). To resolve them, modify your GraphQL endpoint's access-control-allow-origin header to allow requests from https://studio.apollographql.com. Consult your server library's documentation to learn how to modify this header.

If you're using Apollo Server, learn how to configure CORS.

Articles in this section

Was this article helpful?
0 out of 0 found this helpful
Share

Comments

0 comments

Please sign in to leave a comment.