consolelog.tools

GraphQL Schema Validator

Validate a GraphQL SDL schema live — errors, best-practice warnings, and a by-kind type summary.

About this ToolHow it works, benefits & use cases

Paste a GraphQL SDL schema and get instant feedback on whether it holds together and how it is shaped. The validator checks structural syntax — balanced braces and parentheses, and that at least one type is defined — and flags duplicate type names as errors. Beyond hard errors it raises best-practice warnings: type names that are not PascalCase, root field names that are not camelCase, a missing Query type, types with more than 20 fields that might be worth splitting, deprecated fields, and schemas that never use the ID scalar. When the schema is valid you get a by-kind summary counting types, queries, mutations, subscriptions, interfaces, enums, inputs, scalars, unions and deprecated fields, plus chips listing every named type. Validation runs live as you type, the character count is shown, and the schema source can be shared via URL or piped to another tool. Three example schemas — simple, blog and e-commerce — load with a click.

How to Use

  1. 1Paste your GraphQL SDL schema into the editor, or load the Simple, Blog or E-commerce example.
  2. 2Watch validation run live as you type — the panel shows whether the schema is valid and lists any errors.
  3. 3Review the Warnings section for best-practice issues like naming conventions, a missing Query type, or unused ID.
  4. 4Read the Schema summary counts (types, queries, mutations, interfaces, enums, inputs, scalars, unions, deprecated) and the type chips.
  5. 5Click "Validate schema" to confirm, then share the schema URL or pipe the source to another tool.

Key Benefits

  • Live structural validation: balanced braces/parentheses and at least one type required
  • Catches duplicate type names as errors before they reach your server
  • Best-practice warnings for PascalCase types, camelCase fields, a missing Query type and unused ID
  • Flags overly large types (over 20 fields) and counts deprecated fields
  • By-kind summary: types, queries, mutations, subscriptions, interfaces, enums, inputs, scalars, unions
  • Type-name chips for a quick map of everything the schema defines
  • Three loadable examples, character count, shareable URL and pipe-to-tool support

Common Use Cases

  • Sanity-checking a hand-written SDL schema for balance and duplicate types before committing
  • Reviewing a schema against naming and structure conventions in a code review
  • Getting a quick inventory of an unfamiliar schema by kind and named types
  • Spotting deprecated fields and oversized types that are candidates for refactoring
  • Sharing a schema snapshot with a teammate via a single URL

0 characters · SDL · live

Was this tool helpful?

Share Your Experience

Help others discover this tool!

Related tools