Skip to content
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

GraphiQL endpoint broken after migrating to 0.2? "Apollo Server supports only POST requests" #76

Closed
sebastienbarre opened this issue Aug 4, 2016 · 2 comments

Comments

@sebastienbarre
Copy link

Hi guys. Thanks for the great work!
My small Apollo server example was working fine at 0.1, but after following the exact migration path to 0.2 and double checking against the Apollo Server GraphiQL docs page, the server no longer seems to serve GraphiQL correctly.

The page: localhost:9090/graphql always returns Apollo Server supports only POST requests and the GraphiQL GUI never shows up.
Now it's unclear to me if both can be at the same endpoint, as stated in both examples in the doc:

graphQLServer.use('/graphql', bodyParser.json(), apolloExpress({
  schema: executableSchema,
}));
graphQLServer.use('/graphiql', graphiqlExpress({
  endpointURL: '/graphql',
}));

but changing the GraphiQL endpoint to '/graphiql' will bring the UI back, but executing any GraphQL example there will still fail.
Thanks

@helfer
Copy link
Contributor

helfer commented Aug 4, 2016

What error message do you get when executing a query from /graphiql? Does the network tab show that a request to /graphql is made from the GraphiQL UI?

@sebastienbarre
Copy link
Author

This looks like a user error on my side, my apologies. I must have tried the /graphql endpoint first, be confused by the message, modified the code, then tried the /graphiql, which I had broken already by changing the endpointURL. Closing (feel free to nuke the issue entirely).

trevor-scheer added a commit that referenced this issue May 6, 2020
trevor-scheer added a commit that referenced this issue May 14, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants