GraphQL Query Validator
Check GraphQL queries, mutations and fragments against your schema before you send them. Paste SDL or introspection JSON and see supported validation failures, with its line and column.
Accepts up to 200,000 characters of operations, a schema of up to 1,000,000 characters and variables of up to 200,000 characters. Documents are limited to 100,000 tokens and 64 nesting levels, and schemas to 10,000 types. Validation runs in your browser in a background worker and nothing is sent to a GraphQL server. Downloads are a JSON report and a CSV list of errors. Queries, mutations, subscriptions and fragments. Put the schema in the Schema field. Up to 200,000 characters. Review the settings before running.
Your result
How to use GraphQL Query Validator
- Paste your GraphQL operations and fragments in the main box.
- Paste the schema as SDL or introspection JSON in the Schema field.
- Optionally add the variables as a JSON object.
- Run the check, then review each failed rule and download the JSON or CSV report.
Useful next steps
Accepts up to 200,000 characters of operations, a schema of up to 1,000,000 characters and variables of up to 200,000 characters. Documents are limited to 100,000 tokens and 64 nesting levels, and schemas to 10,000 types. Validation runs in your browser in a background worker and nothing is sent to a GraphQL server. Downloads are a JSON report and a CSV list of errors.
What is checked
The validator checks supported rules for fields and return types, leaf and object selections, arguments and required arguments, fragment names, targets, cycles and unused fragments, values and input objects including @oneOf, directives and their locations, and variable definitions, usage and types. When you add variables, their values are checked against the declared types too. The limitations below describe where the custom implementation stops.
How it works
Happytails.ai uses its own bounded GraphQL parser and validator, not graphql-js. Response-name conflicts are compared across fragments and merged child selections, including return shape, arguments and mutually exclusive object branches. __schema and __type require a selection set, but their introspection subfields are not validated. This is not a full GraphQL implementation.
Reading the report
Each error names the rule, a short explanation and the line and column in your operations. The schema itself must be usable: a missing Query type or a field that points to an undefined type stops the check with a message instead of a list.