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

Send query and variables in json body #12

Closed
flexzuu opened this issue Mar 18, 2018 · 9 comments
Closed

Send query and variables in json body #12

flexzuu opened this issue Mar 18, 2018 · 9 comments

Comments

@flexzuu
Copy link

flexzuu commented Mar 18, 2018

I think the issues #7 and #11 are both related to the the client sending data and variables as FormDataContentType but most server implementations expect them as application json in body like

{
  "query":  `query here`,
  "variables": obj with variables here
}
@matryer
Copy link
Contributor

matryer commented May 13, 2018

OK so this is definitely worth changing then?

@flexzuu
Copy link
Author

flexzuu commented May 18, 2018

yeah i think we should be agnostic how the server accepts it and add default implementations for the most common ones.

@kamushadenes
Copy link

kamushadenes commented May 22, 2018

Having problems on interacting with https://github.com/graphql-go/graphql because of this.

@matryer
Copy link
Contributor

matryer commented May 22, 2018

What happens if you're submitting files? The body has to be a multipart, and can't be JSON?

@phated
Copy link

phated commented May 24, 2018

@matryer APIs like Graphcool have a separate API endpoint for submitting files (with multipart) - https://www.graph.cool/docs/reference/graphql-api/file-management-eer4wiang0

@matryer matryer mentioned this issue May 24, 2018
@matryer
Copy link
Contributor

matryer commented May 24, 2018

Please update and try again following #15.

@matryer
Copy link
Contributor

matryer commented May 24, 2018 via email

@matryer
Copy link
Contributor

matryer commented Jul 3, 2018

@flexzuu this is fixed - please confirm?

@matryer
Copy link
Contributor

matryer commented Jul 13, 2018

Closing assuming this is fixed.

@matryer matryer closed this as completed Jul 13, 2018
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

4 participants