-
Notifications
You must be signed in to change notification settings - Fork 26
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
Post request format for queries #149
Comments
Yep, in your import { Adapter } from 'ember-graphql-adapter';
export default Adapter.extend({
httpMethod: 'POST'
}); |
This indeed causes it to make a post request however the body is then sent as a serialized string which is not within the spec. Following the workaround @cheerfulstoic mentioned in this issue I was able to get it working. |
`import GraphQLAdapter from 'ember-graphql-adapter'; export default GraphQLAdapter.extend({ I got this almost working, just thought it might help |
A little late to the party here, but here is what works for me with Hasura:
The key is passing along a content type to force ember-ajax to correctly encode the request body as json. |
According to the documentation for GraphQL you can use a get request with the query url encoded or a post request with a json object in the body of the request. Is there currently support for the post request format?
http://graphql.org/learn/serving-over-http/#post-request
The text was updated successfully, but these errors were encountered: