DevTools Hub

Search tools

Search for a developer tool

GraphQL

GraphQL Query Validator

Validate a GraphQL query against your schema — unknown fields, wrong argument types, missing required arguments — or run structural checks alone if you don't have a schema handy.

Part of the GraphQL Toolkit
Validated against your schema
  • Cannot query field "nonexistentField" on type "User".
    line 5, column 5

What this checks

Paste a query, mutation, or subscription. If you also paste your schema's SDL, this runs the real graphql-js validator — every rule the reference implementation itself enforces — catching an unknown field, a wrong argument type, a missing required argument, or an unknown type in a fragment's type condition.

No schema handy? This still runs a meaningful subset of validation without one: unused or undefined variables, duplicate operation/fragment/argument names, a fragment that spreads itself in a cycle, a fragment defined but never used, and an anonymous operation mixed with named ones. These are genuine spec rules that only look at the query's own structure, not at any type information — verified directly by running them against a real schema and confirming the results match.

What this isn't

Without a schema, this can't catch anything that requires knowing what fields or arguments actually exist — a typo'd field name looks structurally fine on its own. Even with a schema, this only validates the document's shape against your types; it doesn't execute the query or know what data a resolver would actually return. For formatting a query or schema instead of validating it, see GraphQL Formatter.

FAQ

My schema didn't validate — why?

The SDL itself has to parse and build as a real schema first — a typo in a type name, an unclosed brace, or a field referencing a type that's never defined all fail at this step. When that happens, the query still gets checked with the structural rules above, just without the schema-aware ones.

Is my query or schema uploaded anywhere?

No — validation happens entirely in your browser.

Related tools