GraphQL Schema Lab
A GraphQL query can parse yet still violate its schema: required arguments may be absent, variable positions may be incompatible, and fragments may form cycles. Paste an SDL schema, one query and a variables object to check those rules in the browser. For a valid query, inspect the selected field paths and a type-shaped synthetic response.
Key features
- Validate SDL schema and one query against GraphQL field, argument, fragment and variable rules
- Separate SDL/query syntax, contract validation and JSON variable coercion errors with source locations
- Expand direct, aliased and fragment selections into typed field paths
- Execute standard include/skip directives against deterministic local synthetic values
- Export the diagnostics, graph and mock JSON as a report
How to use
- Load the valid example or paste your own SDL schema.
- Enter a single query and, where needed, a JSON object of variable values.
- Run validation and inspect each error stage and source location.
- For a valid query, compare selected field paths with the synthetic response.
- Edit inputs and rerun; save a report only when you choose.
Use cases
- Find a missing required field argument before integrating a client query
- Diagnose a fragment cycle or an incompatible variable declaration
- Review aliases and nested return types during API client development
- Explore the response shape without connecting to a live GraphQL server
Frequently asked questions
Does this call my GraphQL server?
No. SDL, query and variables stay in current browser memory. GraphQL.js validates the contract and executes only deterministic synthetic field values; no URL or real resolver is used.
What language features are supported?
Exactly one query operation with object, input, enum and built-in scalar types; normal aliases, fragments, variables and standard include/skip directives are supported. Mutations, subscriptions, multiple operations, interfaces, unions, custom scalars/directives and introspection are outside this bounded mock profile.
Are the example values real?
No. Strings, numbers, IDs and booleans are reproducible placeholders derived from field paths. Lists contain one synthetic item. No database values, authorization rules or custom resolver behavior are represented.
Why can the graph show a field absent from JSON?
The graph is a static view of all selected branches. The mock executes standard include/skip directives using your variables, so a conditional branch can be omitted from JSON.
Is a valid result a full GraphQL conformance certificate?
No. Validation uses GraphQL.js rules for this bounded input, while server-specific schema extensions, resolvers, performance and business rules are not tested.
Privacy
Inputs are processed in browser memory. No GraphQL endpoint, schema registry or resolver is contacted. An exported report contains your field names and diagnostics.
Comments & questions