Browser-based developer tool · schemas are parsed in this tab

GraphQL Schema Visualizer

Paste a GraphQL schema in SDL or the JSON from an introspection query. You get a graph you can rearrange, a clickable type reference, and SVG and Markdown files to put in your docs or a pull request.

Schema

Drop a .graphql or introspection .json file

Up to 5 MB

Read SDL: 9 types, 1 custom directives.
Show in graph

Graph

8 nodes, 11 links. Drag a type to move it, or focus it and use the arrow keys.

90%
Query → User (user, users)user, usersQuery → SearchResult (search)Mutation → Post (createPost)User → Role (role)roleUser → Post (posts)postsUser → User (friends)friendsUser → NodeSearchResult → UserSearchResult → PostPost → User (author)authorPost → Node«query» Queryuser(…): Userusers(…): [User!]!search(…): [SearchResult!]!«mutation» MutationcreatePost(…): Post!deletePost(…): BooleanUserid: ID!name: String!role: Role!posts: [Post!]!friends: [User!]!«enum» RoleADMINEDITORVIEWER«union» SearchResult| User| PostPostid: ID!title: String!author: User!publishedAt: DateTime«input» CreatePostInputtitle: String!authorId: ID!«interface» Nodeid: ID!

Solid arrows are fields and arguments, dashed purple is implements, dotted amber is a union member. Select a type to show its field names on the arrows.

Type reference

Click a type, or a type name inside it, to read its fields.

type

User

implements

A registered account.

@key(fields: "id")

  • id: ID!
  • name: String!
  • role:
  • posts:
  • friends:

GraphQL Schema Visualizer for SDL and Introspection JSON

Operator: Abdulla Al Fahad. How tools are built and checked

A GraphQL schema is easy to read in pieces and hard to hold in your head as a whole. Which types can you reach from Query? Which type is referenced by forty fields and so is expensive to change? Which interfaces does Post implement? A flat file answers those questions slowly; a graph answers them at a glance.

This page reads either schema definition language (SDL) or the JSON returned by the introspection query, builds one model from it, and draws the types as boxes with arrows for fields, implements and union membership. A reference panel under the graph lists every type with its fields, arguments, descriptions and deprecations.

Past about a hundred types a diagram stops being a picture and becomes a map, so the page is built for that case: kind filters, a type search, a cap on what is drawn, and a reference list that always has every type.

Key features

  • SDL parser written for this page: object types, interfaces (including interfaces that implement interfaces), unions, enums, input objects, custom scalars, directive definitions and extend blocks
  • Introspection reader that accepts the full response with its data wrapper, or just the __schema object
  • Layered graph from the root operation types outward, with drag to move and arrow keys for keyboard users
  • Filters for types, interfaces, unions, enums, inputs and custom scalars so a large schema can be thinned out
  • Field names appear on the arrows of the selected type; deprecated fields are struck through
  • Type filter box that narrows the reference list by name, for schemas too large to scan
  • SVG export of the current layout and a Markdown reference with a contents list and linked type names

What the parser reads and how the graph is drawn

SDL is tokenised and parsed as the GraphQL specification describes it: comments with #, string and block-string descriptions, argument lists with default values, repeatable directive declarations and implemented interfaces joined with &. Errors carry a line and column, so a missing closing brace is reported as, for example, Unclosed { in User at the point where the parser ran out of input. Defining the same type twice is an error; extend type merges its fields into the existing definition and, if no base definition exists, creates the type anyway and keeps going.

Unions and interfaces are drawn as they are stored: a union box lists its members and draws one dotted arrow to each, and an interface box gets a dashed arrow from every implementing type, so an interface with 30 implementers fans out wide. Switching union or interface off in the filters removes the box and every arrow that touched it, which is the quickest way to untangle a schema with a heavy Node or SearchResult type.

Introspection JSON is converted into the same model. The nested LIST and NON_NULL wrappers are printed back as [Post!]!, internal types that start with two underscores are dropped, and isDeprecated with deprecationReason become deprecation notes. Both inputs end up in one structure, so everything downstream (graph, reference, Markdown) behaves identically.

The graph holds at most 120 types, chosen breadth first from Query, Mutation and Subscription so the part you can actually call is kept, then any remaining types in file order. Each box shows its first 8 fields or values and a +N more line. Arrows are drawn when a field or argument type, an implemented interface or a union member is another drawn type. Built-in scalars (Int, Float, String, Boolean, ID) are never drawn, and custom scalars are off by default because every date field would otherwise point at the same box.

The Markdown export lists all types, not only the drawn ones, ordered root operations first, then objects, interfaces, unions, inputs, enums and scalars. All schema text is escaped before it goes into the file, so a description containing angle brackets or backticks stays text.

How it works

Layout is by distance from the roots. Query, Mutation and Subscription go in the first column, every type they point at goes in the second, the types those point at in the third, and so on, using the shortest path. Types nothing can reach are started from the types nobody points at, and a tall column wraps into a second one. It is a layered drawing, not a force simulation, so the same schema always opens in the same layout, and dragging only moves what you drag.

When this helps

  • A 400-type schema inherited from another team: select User and read the 38 fields elsewhere that point at it before renaming a field.
  • A design review of a new billing domain: paste the 9 new types from the pull request, drag them into a left-to-right flow and export the SVG for the slide.
  • Two schema files merged into one that fails a build with "Referenced but not defined: Money": the list of undefined names says which file is missing.
  • A staging introspection dump read for deprecated fields before a client release, using the strike-through on fields and the deprecation notes in the Markdown.

Opening a file

  1. Paste the SDL or introspection JSON, or drop a .graphql, .gql or .json file.
  2. Tick the kinds of type you want in the graph, then drag boxes into a layout that reads well.
  3. Select a type to light up its arrows and read its fields in the reference panel.
  4. Download the SVG for slides or a README, and the Markdown for documentation.

Example

SDL

type Query { user(id: ID!): User }
interface Node { id: ID! }
type User implements Node { id: ID! posts: [Post!]! }
type Post { author: User! }

Graph

Four boxes: Query on the left, User one column to the right, Node and Post in the next column.
Arrows: Query to User (field user), User to Post (field posts), Post to User (field author), and a dashed purple arrow from User to Node (implements).
The Markdown reference shows posts as \[[Post](#post)!\]!, linking to the Post section.

Tips for best results

  • Turn off Inputs when you are studying reads: input objects form their own cluster off to one side and rarely connect to anything else.
  • Select the type you care about before taking the SVG; the export keeps node positions but not the highlighting, so arrange the layout first.
  • Use the type search box for a schema with hundreds of types, since the graph caps at 120.

Limits

Federation directives such as @key and @external are parsed and shown as text on the type, but entity relationships across subgraphs are not resolved; paste the composed supergraph SDL for the full picture.

Introspection output only lists what the server exposes. A server with introspection filtered by role will give you a partial schema.

The legacy syntax of separating implemented interfaces with commas, as in implements A, B, is not accepted; use & as the specification now requires.

Common errors and how to fix them

"Line 12, column 3: Expected a name for a type, found }"
A field is missing its type after the colon, for example name: with nothing following it. The line and column point to the token the parser tripped over.
"Type User is defined twice"
Two files were concatenated that both define User. Turn the second into extend type User if you meant to add fields.
"Referenced but not defined: Money"
A field uses a type that appears nowhere in the pasted text, usually a scalar or type from another file. Paste the missing file too or declare scalar Money.

Best practices

  • Commit the SDL, not an introspection dump, as the source of truth. SDL keeps descriptions, ordering and extend blocks, and a diff of it reads as a schema change.

Reading the arrows

The arrow style carries the relationship, so a crowded graph can still be read.

  • Solid grey: a field or argument whose type is the target
  • Dashed purple: the source type implements the target interface
  • Dotted amber: the target is a member of the source union
  • A loop on one box: a self reference such as User.friends

Frequently asked questions

Does it call my GraphQL endpoint?

No. You supply the schema text or JSON; to get introspection JSON from a server, run the standard introspection query yourself and paste the result.

Why are some of my types missing from the graph?

Either their kind is unticked in Show in graph, or the schema has more than 120 drawable types and these were beyond the cutoff. They are still in the reference panel and the Markdown export.

Can it read a composed federation supergraph?

Yes, it parses as ordinary SDL. The join__ and link directives and the join__Graph enum show up as text on the types and as an enum node, so filter enums off if they crowd the graph.