ID |
|
|---|---|
Status |
Backlog |
Bucket |
cleanup |
Priority |
10 |
Theme |
pagination |
Updated |
2026-09-22 |
Drop the assembled-schema rebuild in favour of per-variant graphql-java forms
ConnectionPromoter.rebuildAssembledForConnections (the single producer, consuming the per-field synthesis from ConnectionPromoter.synthesiseForField; line numbers deliberately not cited, they rot) rebuilds the assembled GraphQLSchema via SchemaTransformer so directive-driven @asConnection carriers carry their rewritten return type and pagination args. The rebuild only runs at generate time and is never seen by the runtime (which reconstructs its schema from emitted <TypeName>Type.type() calls in GraphitronSchema.build()).
Alternative: skip the rebuild; rebuild each carrier’s parent GraphQLObjectType once via parent.transform(b -> b.field(rewrittenField)) and stash it on the corresponding GraphitronType variant; emitters read per-variant schemaType() only. Already done for the synthesised types (Connection / Edge / PageInfo); this extends the pattern to rewritten parents.
Saves the two-step additionalType + SchemaTransformer dance (~80 lines of classifier code) and the bundle-coherence overhead. Costs the bundle’s "every type reference resolves on assembled.getType()`" invariant: any future build-time consumer that wants a coherent `GraphQLSchema (SDL printer for client schemas, an introspection-based validator, federation manifest emitter) would have to be re-engineered.
Worth picking up when a concrete signal pushes the trade, e.g. an emitter explicitly preferring per-variant graphql-java forms over name-keyed assembled.getType() lookups, or schema-rebuild edge cases turning into recurring debugging cost. Until then, the rebuild is paying its rent and rebuildAssembledForConnections stays.
Fact-base note (2026-08-06)
The awaited concrete signal arrived: capture walks the type-definition registry (assembly is the superlinear half capture never pays) and owns macro expansion with synthesis provenance, so the coherent assembled GraphQLSchema stops being the model. Re-evaluate around which un-migrated consumers still need assembled.getType(); the rebuild retires with them.
Context and the whole-board picture: roadmap/audits/2026-08-06-fact-base-impact-sweep.md.
The consumers were counted (2026-09-22)
Three live readers of the rebuilt schema, plus a Bundle.assembled field with no production reader:
rejectUnregisteredScalarReferences, EntityResolutionBuilder.build and
ArgumentReachableInputs.compute. Two of the three are transitive closures over the emitted element
population, which the graphitron_ anchors already hold, so they convert to gatherer-written facts
rather than needing a coherent GraphQLSchema at all. That leaves federation entity resolution as
the one consumer the trade in the body above is actually about, which is a smaller question than the
one this item was filed to hold open. R876’s section "The emitted schema has three readers, and two
of them are closures" carries the count and the order.