Build a GraphQL Request Payload
Validate a GraphQL query and variables object, then generate request JSON, cURL, and fetch output.
Try it now
Try it now
Open GraphQL Query + Variables Playground with a ready-to-run example.
When you need this
- You need a reproducible GraphQL request body for a bug report or test case.
- You want to verify that variables JSON matches the query before sharing it.
- You need ready-to-use cURL or fetch output for a GraphQL endpoint.
How to do it with Daily Developer Tools
- Paste the GraphQL operation into the playground.
- Add the variables JSON and optional endpoint URL.
- Generate request JSON, cURL, and fetch output from the same validated payload.
Tips / common pitfalls
- Keep variables as a JSON object instead of an array.
- Use an operation name to make shared examples easier to understand.
- Add auth headers when you need a complete request example.
Examples & test data
Orders query request
Input example
{
"url": "https://api.example.com/graphql",
"query": "query GetOrders($status: String!, $limit: Int!) { orders(status: $status, limit: $limit) { id total status } }",
"variables": {
"status": "PAID",
"limit": 10
}
}
Expected output
Request JSON with query + variables
FAQ
Can I generate cURL output too?
Yes. Add the endpoint URL and the tool generates cURL and fetch snippets.
Does it validate variables JSON?
Yes. The playground checks that variables are valid JSON and shaped as an object.
Related tools
Privacy-first: runs locally in your browser. No uploads.