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 app requests using POST don't work - add warning in docs #11

Closed
meddulla opened this issue Apr 11, 2017 · 2 comments
Closed

GraphiQL app requests using POST don't work - add warning in docs #11

meddulla opened this issue Apr 11, 2017 · 2 comments

Comments

@meddulla
Copy link

Hi,

This app has the CORS filter enabled which, since GraphiQL app sends the header "Origin:null", makes POST requests fail. I know GraphiQL is embedded in a template but I was trying to debug why my custom app wasn't working in GraphiQL so download this repo to make sure I wasn't missing anything and lo and behold! GraphiQL doesn't work here either. After some trial and error, finally understood that the problem was the Origin header that GraphiQL was sending...
So to save other people'e time, a small note in the documentation would be nice. For example, something like this:

Warning to GraphiQL app users
Due to the fact that GraphiQL sends the Origin header as null (see skevy/graphiql-app#53), in apps that have CORS enabled, POST requests won't work. Either use the embedded GraphiQL view or disable CORS.

Thanks a lot for Sangria by the way :)

@intellix
Copy link

intellix commented Jun 17, 2017

Just to let you know that an Origin was added to GraphiQL App: skevy/graphiql-app#66
It's: electron://graphiql-app

@Enalmada
Copy link

Noting that the new graphql-playground seems to have the same issue:
graphql/graphql-playground#296

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

No branches or pull requests

3 participants