Expand description
GraphQL SDL generated from inferred route shapes.
Unlike the other dialects, this one cannot pass JSON Schema through: SDL is a different type system, not a different serialization. Three mismatches shape the whole module:
- Inputs and outputs are separate declarations. A struct used as both
a request body and a response becomes
ItemandItemInput; GraphQL forbids one declaration serving both positions. - Nullability lives on the reference, not the object. JSON Schema says
required: [id]on the parent; SDL saysid: ID!on the field. - Not everything crosses. Untagged unions, flattened structs, maps and
64-bit integers have no faithful SDL spelling. Each becomes a note and a
JSON(orInt64) custom scalar rather than a quietly wrong type — the same “imprecise, never wrong” rule the extractor follows for gaps.
The document this module builds is a type graph, not SDL text; to_sdl
renders it and diff compares two of them. Diffing the
graph rather than the text is what lets the gate say “field removed”
instead of “line 42 changed”.
Modules§
- diff
- Compatibility diffing between two generated GraphQL type graphs.