Back to Tools
GraphQL to JSON
GraphQL to JSON
Convert a GraphQL query shape into a mock JSON response structure.
About the GraphQL to JSON
Convert a GraphQL query into a JSON structure.
How to use the GraphQL to JSON
- Paste your code into the input box, or click Sample to load an example.
- Press Process / Generate.
- Use Copy (or Download where shown) to keep the result. Clear empties the box.
Worked example
query { user { id name } } becomes a JSON object showing the user field and its sub-fields.
Tips
- Useful for analysing the shape of a query.
Frequently Asked Questions
No. It only converts the text of the query.