Commit 5c9fbb4
committed
Replace legacy emitter with foundation skeleton and diagnostics
Removes the procedural GraphQL emitter and stands up the data-pipeline
skeleton that the upcoming Alloy component-based emitter will build on.
Deleted:
- graphql-emitter.ts (old procedural emitter)
- schema-emitter.ts (old schema-specific emitter)
- registry.ts (old type registry)
- type-maps.ts (old type mapping logic)
- test/emitter.test.ts tests for the legacy emitter
Rewrote src/emitter.ts as a four-phase data pipeline:
- Phase 1: type usage tracking (reachability / input-output marking)
- Phase 2: mutation (GraphQL naming via the mutation engine)
- Phase 3: classification (interfaces, output models, input models, ops)
- Phase 4: model variant lookups
The pipeline produces a SchemaPipelineResult bundle
(classifiedTypes, modelVariants, scalarSpecifications) that is handed
to a renderSchema stub. The stub is a no-op in this PR; component-based
SDL rendering, file emission, and the .tsx conversion land in follow-up
PRs. Introducing the SchemaPipelineResult type and the pipeline/renderer
seam here keeps the downstream PR reviewable on its own.
Also introduces two new diagnostics that the pipeline reports today:
- empty-schema: fires when a schema has no query root (GraphQL requires one)
- void-operation-return: fires when an operation returns void (no GraphQL
equivalent; the operation is filtered out of the schema)
Test coverage added for both diagnostics in test/emitter.test.ts.1 parent a4248e4 commit 5c9fbb4
7 files changed
Lines changed: 445 additions & 402 deletions
File tree
- packages/graphql
- src
- test
0 commit comments