You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A complete GraphQL SDL compiler, covering plain schemas and Apollo Federation v1/v2 subgraphs, was drafted in #20 (branch feat/graphql-compiler, head d05f37f, +9,090 lines across 58 files). It parses at the SDL level through github.com/vektah/gqlparser/v2 so extend occurrences and federation directives arrive as written, and lowers: objects and interfaces to Model (with Implements), input objects to InputOnly models and @oneOf inputs to key-tagged exclusive unions, union types to __typename-tagged unions with an internal discriminator, enums, custom scalars (with @specifiedBy), ID as a distinct named scalar, field arguments onto Property.Args, every [T!]! layering onto Required + Nullable per layer, root types onto one service with query/mutation/subscription groups and a GraphQLBinding per field, and directive applications preserved in order under the graphql: namespace. Conformance corpus under testdata/conformance/graphql, goldens under testdata/golden/graphql. The PR body is the design record; read it before starting over.
It was opened 2026-07-21, last pushed 2026-07-23, and has not been reviewed. README milestone 5 places the GraphQL compiler after AsyncAPI, so this is the tracking issue for that row, not a request to land the draft now. The Protobuf counterpart is #469.
Why the draft cannot land as it stands
Measured against main at e1e92a0 (161 commits ahead of the draft's base):
Package layout. The draft predates the micro-compiler restructure (docs/micro-compiler-design.md) and is one flat package with its own ids.go and diag.go. internal/archtest's rules map, the 20-method cap on compiler types, and the per-package allowlists all postdate it; the arch_test.go conflict is that map having been rewritten underneath it.
go.sum conflicts, and the last gate run on the branch (2026-07-21) failed at the gofmt step before reaching anything else.
What reviving it needs
Rebase is not the shape of the work — start a fresh branch from main and port the lowering, using the draft as the reference for the SDL→IR mapping decisions, in particular the nullability layering and the two union shapes.
Implement Detect (an SDL source is recognisable from a top-level type/schema/extend/directive keyword; bounded sniff, same discipline as compilers/openapi/detect.go).
Lay it out as compilers/graphql + compilers/graphql/internal/*, each internal package with its own archtest rules entry; use compilers/compile for naming and IDs rather than a local grammar.
Regenerate the goldens at the current IRVersion and re-derive the conformance matrix witnesses (docs/ir-spec-matrix.md row keys) for the rows GraphQL can express.
Run the full oracle sweep: go run ./cmd/morphic-harness testdata/conformance/graphql.
Decision needed
Whether #20 stays open as a draft or is closed with this issue as its pointer. Either way the branch should not be deleted — the design work in it is the asset.
What exists
A complete GraphQL SDL compiler, covering plain schemas and Apollo Federation v1/v2 subgraphs, was drafted in #20 (branch
feat/graphql-compiler, headd05f37f, +9,090 lines across 58 files). It parses at the SDL level throughgithub.com/vektah/gqlparser/v2soextendoccurrences and federation directives arrive as written, and lowers: objects and interfaces toModel(withImplements), input objects toInputOnlymodels and@oneOfinputs to key-tagged exclusive unions, union types to__typename-tagged unions with an internal discriminator, enums, custom scalars (with@specifiedBy),IDas a distinct named scalar, field arguments ontoProperty.Args, every[T!]!layering ontoRequired+Nullableper layer, root types onto one service with query/mutation/subscription groups and aGraphQLBindingper field, and directive applications preserved in order under thegraphql:namespace. Conformance corpus undertestdata/conformance/graphql, goldens undertestdata/golden/graphql. The PR body is the design record; read it before starting over.It was opened 2026-07-21, last pushed 2026-07-23, and has not been reviewed. README milestone 5 places the GraphQL compiler after AsyncAPI, so this is the tracking issue for that row, not a request to land the draft now. The Protobuf counterpart is #469.
Why the draft cannot land as it stands
Measured against
mainate1e92a0(161 commits ahead of the draft's base):compilers.Compilernow requiresFormats,DetectandCompile(compilers/compilers.go, added by feat(engine)!: let compilers own format detection and options #341). The draft implementsFormatsandCompileonly, so it does not build."irVersion": "0.1.0";mainis at0.4.0after three breaking revisions (feat(ir)!: add Payload.Required and Parameter.Provenance #437–feat(ir)!: bump IRVersion to 0.4.0 for the stack's shape changes #442, feat(ir)!: land the IR 0.4.0 stack #464). The lowering targets struct shapes that no longer exist —ErrorCaseis a response, exclusive bounds are carried separately,Payload.RequiredandParameter.Provenanceexist, and so on.docs/micro-compiler-design.md) and is one flat package with its ownids.goanddiag.go.internal/archtest'srulesmap, the 20-method cap on compiler types, and the per-package allowlists all postdate it; thearch_test.goconflict is that map having been rewritten underneath it.canonicalWordsand the identifier grammar were extracted intocompilers/compileby compilers/compile: own the identifier grammar shared by every compiler #162/compilers/compile: own the canonical naming grammar #163/refactor: move the naming and ID grammars into the framework #183 because this draft's copy was byte-identical to the OpenAPI one and Protobuf's had diverged (compilers: canonical naming grammar diverges across the three compilers #161). The draft still carries its own.go.sumconflicts, and the last gate run on the branch (2026-07-21) failed at thegofmtstep before reaching anything else.What reviving it needs
mainand port the lowering, using the draft as the reference for the SDL→IR mapping decisions, in particular the nullability layering and the two union shapes.Detect(an SDL source is recognisable from a top-leveltype/schema/extend/directivekeyword; bounded sniff, same discipline ascompilers/openapi/detect.go).compilers/graphql+compilers/graphql/internal/*, each internal package with its ownarchtestrules entry; usecompilers/compilefor naming and IDs rather than a local grammar.IRVersionand re-derive the conformance matrix witnesses (docs/ir-spec-matrix.mdrow keys) for the rows GraphQL can express.go run ./cmd/morphic-harness testdata/conformance/graphql.Decision needed
Whether #20 stays open as a draft or is closed with this issue as its pointer. Either way the branch should not be deleted — the design work in it is the asset.
Refs #20.