Sending data as JSON
Here is how to send your data to us as JSON instead of embedding it into the GraphQL queries.
Most of the documentation examples shows you how to send data by embedding values into the GraphQL queries.
We understand that such long query strings would be difficult to construct with code. Here is how to send query and data separately.
Each GraphQL request to our API contains a JSON of minimum two properties: query
and optional variables
. You can (and should) declare parameters using the GraphQL dollar-notation and then reuse it in the query or mutation.
Here is a screenshot of how a mutation looks in GraphQL Playground:
Same request as cURL:
Last updated