Summary
Interfaces used as defineSubscription generics are referenced by name in the generated schema but never extracted/emitted as type definitions, producing schemas that reference undefined types.
Evidence
The committed goldens of subscription-only, subscription-mixed, subscription-directives-tsdoc, import-extension-none, and import-extension-ts (packages/cli/src/gen-orchestrator/testdata/) contain fields typed Event! / Message! / User! with no corresponding type definition in the same schema.graphql. graphql-js's buildASTSchema rejects these schemas with "Unknown type".
gqlkit's own pipeline never runs strict SDL validation, so this ships silently today. Any downstream consumer that round-trips the SDL through graphql-js (or uses makeExecutableSchema with strict validation) will fail.
Origin
Plain interfaces consumed only as defineSubscription<Args, Payload> type arguments are resolved by name (they land in the schema as references) but never go through type extraction as declarations.
Context
Discovered during the refactoring plan's Phase 6 pruning survey (.kiro/specs/refactor-plan.md, Phase 6 execution note), where enabling buildASTSchema-based pruning crashed on exactly these cases. Deliberately not fixed in that PR (out of scope). The Phase 9 resolver-side type-reference validation work (Decision D6) is the natural home for at least detecting this as a diagnostic.
🤖 Generated with Claude Code
Summary
Interfaces used as
defineSubscriptiongenerics are referenced by name in the generated schema but never extracted/emitted as type definitions, producing schemas that reference undefined types.Evidence
The committed goldens of
subscription-only,subscription-mixed,subscription-directives-tsdoc,import-extension-none, andimport-extension-ts(packages/cli/src/gen-orchestrator/testdata/) contain fields typedEvent!/Message!/User!with no corresponding type definition in the same schema.graphql. graphql-js'sbuildASTSchemarejects these schemas with "Unknown type".gqlkit's own pipeline never runs strict SDL validation, so this ships silently today. Any downstream consumer that round-trips the SDL through graphql-js (or uses
makeExecutableSchemawith strict validation) will fail.Origin
Plain interfaces consumed only as
defineSubscription<Args, Payload>type arguments are resolved by name (they land in the schema as references) but never go through type extraction as declarations.Context
Discovered during the refactoring plan's Phase 6 pruning survey (
.kiro/specs/refactor-plan.md, Phase 6 execution note), where enablingbuildASTSchema-based pruning crashed on exactly these cases. Deliberately not fixed in that PR (out of scope). The Phase 9 resolver-side type-reference validation work (Decision D6) is the natural home for at least detecting this as a diagnostic.🤖 Generated with Claude Code