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:
type,interface, andinputblocks are read along with their{ ... }field bodies; each field’s return type is captured.enum,union, andscalardefinitions are collected with their symbols or members.- For every field whose return type — once stripped of list
[ ]and non-null!wrappers — names another defined type, an edgeFrom.field → Tois 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.