How to use GraphQL Formatter
Lay out GraphQL fields, arguments and nested selection sets so the query or schema source is easier to review.
- Paste GraphQL or open a .graphql or .gql file.
- Choose Indentation and format, then inspect the nesting in the new source.
- Select Format and review the result.
Example input
query Inventory { items(first: 5) { id name quantity } }Example use
Review a query with several nested objects to confirm requested fields appear inside the intended selection sets.
Output and compatibility
Parsing a document is different from validating it against your GraphQL service schema. The tool does not issue requests or check actual field availability.
Troubleshooting
If source fails to format, check unclosed selection sets and whether it includes template expressions from another language.
Use JSON Formatter to inspect a JSON response alongside the query.
Frequently asked questions
Will it execute a GraphQL request?
It reformats the supplied document as text.
Does it check if the fields exist on my API?
That requires the API schema and its validation tools.