GraphQL Schema Visualizer

Paste a GraphQL SDL schema and see type relationships as a graph.

Ad placeholder (leaderboard)

A GraphQL schema written in SDL (Schema Definition Language) declares every type your API exposes and how those types reference one another. As a schema grows, the web of relationships — which type points at which — becomes the hard part to hold in your head. This visualizer parses the SDL and surfaces both the type list and the relationship edges between types.

How it works

The parser first strips descriptions and comments, then extracts definitions with a lightweight tokenizer:

  1. type, interface, and input blocks are read along with their { ... } field bodies; each field’s return type is captured.
  2. enum, union, and scalar definitions are collected with their symbols or members.
  3. For every field whose return type — once stripped of list [ ] and non-null ! wrappers — names another defined type, an edge From.field → To is recorded.

The set of edges is the adjacency list of the schema’s relationship graph: walk it to see how data connects from the root Query outward.

Example

Given:

type Post {
  author: User!
  comments: [Comment!]
}

the visualizer produces two edges — Post.author → User and Post.comments → Comment — because both User and Comment are defined types. A field returning String produces no edge, since String is a built-in scalar.

Notes

The tool also flags any field that references a name which is neither a built-in scalar nor a defined type, catching typos and missing definitions early. It maps structure, not behavior, so it does not execute queries or validate resolver logic — it is a fast way to understand and audit how a schema’s types relate.

Ad placeholder (rectangle)