API & HTTP

GraphQL Schema Inspector

Paste or drop a GraphQL schema (SDL) to check its syntax with exact line and column errors, browse types, fields, arguments and return types, search the whole schema, and export a JSON representation or Markdown documentation. Everything runs in your browser. Nothing is uploaded, and the tool never contacts a GraphQL endpoint.

Guide: GraphQL Schema Inspector: Validate and Explore SDL Files

Drop a .graphql or .gql file anywhere on this tool, or paste SDL above. The file is read in your browser and never uploaded.
Ready. Paste GraphQL SDL, drop a .graphql file, or load the example.

What this tool checks

The tool reads GraphQL schema definition language (SDL): object types, interfaces, unions, enums, scalars, input objects, directive definitions, the schema block and type extensions. Syntax errors are reported with the line and column where they were found, and the parser keeps going so several errors can be shown at once. After parsing it builds a model of the schema and checks it: duplicate definitions, unknown type references (with suggestions), fields and arguments that use the wrong kind of type, interface implementations that do not match, unions with non-object members, invalid default values, unknown or misplaced directives and non-null cycles between input objects.

Explorer, search and documentation

The explorer follows the path Type, then Field, then Arguments, then Return type: select a type, read its fields and arguments, and click a return type to open it. A breadcrumb lets you step back. Search covers type, field, argument, enum value and directive names, optionally descriptions, and highlights the matching text. The Operations tab lists every query, mutation and subscription, and the Documentation tab renders the whole schema as readable reference that you can download as Markdown. Large schemas are analysed in a background worker and long lists are shown a page at a time.

What it does not do

  • It is not the reference GraphQL validator. A schema with no errors here has parsed and passed this tool’s checks; that does not guarantee a particular server will accept it. Servers and frameworks add their own rules and directives.
  • It inspects SDL only. Queries, mutations and fragments are operations, not schema, and are rejected with an explanation.
  • It does not run introspection, send queries or contact any endpoint. To inspect a live API, export its schema as SDL yourself and paste it here.
  • Types a tool refers to but does not define, such as scalars or directives that a framework adds for you, are reported so you can define or ignore them.
  • Columns are counted in UTF-16 code units, the same as most editors. Descriptions in any language are supported; names must be ASCII, as the GraphQL specification requires.
  • The JSON export describes the SDL as parsed. It is not an introspection result.

Privacy

The schema is processed in your browser, in a background worker. It is not uploaded, logged or stored, and the tool makes no network requests with it. When you send JSON or documentation to another tool, the text is passed through your browser’s session storage and cleared after it is received.

Share this tool

Your data is not included in this link.