Repository navigation
Port upstream v0.27.3 and v0.28.0 - #8
Merged
Merged
Conversation
DeprecatedInterfaceFieldImplementationRule (graphql-hive/federation-composition#349): a deprecated field whose interface field is not deprecated is an INVALID_GRAPHQL error, which graphql-js 17 would reject in the supergraph. The new test of INVALID-GRAPHQL.spec.ts is ported, and the huge-schema fixture deprecates the interface fields its implementations deprecate. Conformance at v0.27.3: 7,376 passed, 25 skipped, 8 todo on wasm; 3,601/3,601 compositions identical.
composeServicesWithContracts (graphql-hive/federation-composition#347): the supergraph is composed once, and each contract is derived from its state: the tag filter is applied to the supergraph state (supergraph_state_contract.rs), only the @inaccessible rules run (validate_inaccessible_usage), the supergraph is built again, and the state is restored for the next contract. When the subgraphs fail to compose, each contract is composed from the subgraphs. composeSchemaContract gains a skipSatisfiability option. The filter decisions shared by both filters (isExcludedByFilter, isExcludedByExcludeFilter, isArgumentExcludedByFilter) are in tag_extraction. A subgraph state stripped of its types keeps its tagged fields' @tags (SubgraphState::field_tags), which the state filter reads for external fields. The wasm bindings and the npm shim export composeServicesWithContracts and SchemaContract; the shim shares a contract's unchanged definitions with the supergraph's document, as upstream does. Conformance at v0.28.0: 7,401 passed, 25 skipped, 8 todo on wasm; 3,714/3,714 compositions identical.
contracts_bench composes a fixture with 0, 2, 4 and 8 @tag contracts three ways: compose_services then compose_schema_contract per contract, the same with skip_satisfiability, and compose_services_with_contracts. It tags the fixture first (public on every type, feature tags on a share of fields) and checks that the three agree before timing. At 8 contracts: large-graph 273 / 97 / 51 ms, huge-schema 921 / 754 / 344 ms.
kamilkisiela
commented
Dec 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports upstream v0.27.3 and v0.28.0, one commit each, and moves
UPSTREAMtov0.28.0.v0.27.3
DeprecatedInterfaceFieldImplementationRule(Reject deprecated field if interface field is not federation-composition#349): a deprecated field whose interface field is not deprecated fails composition withINVALID_GRAPHQL, since graphql-js 17 rejects such a schema.INVALID-GRAPHQLtest and the updatedhuge-schemafixture are ported.v0.28.0
From graphql-hive/federation-composition#347:
composeSchemaContractgains askipSatisfiabilityoption (ComposeSchemaContractOptions;compose_schema_contracttakes anoptionsargument).composeServicesWithContracts(newcontracts/supergraph_state_contract.rs) composes the supergraph once and derives each contract from its state: the tag filter is applied to the state, only the six@inaccessiblerules run (validate_inaccessible_usage), the supergraph is built again, and the state is restored for the next contract. When the subgraphs fail to compose, each contract is composed in full.isExcludedByFilter,isExcludedByExcludeFilter,isArgumentExcludedByFilter) are shared by both filters intag_extraction.rs.composeServicesWithContractsandSchemaContract. The shim shares a contract's unchanged definitions with the supergraph's document, as upstream does.Where the Rust differs in mechanism, not in result:
@tags. Upstream reads them from the subgraph states' types, which the Rust drops after merging each subgraph. A stripped subgraph state now keeps its tagged fields' tags (SubgraphState::field_tags); untagged fields cost nothing.restoreputs it back.Verification
pnpm conformanceat v0.28.0: 7,401 passed, 25 skipped, 8 todo on wasm (same as upstream's own TypeScript); 3,714/3,714 compositions identical.cargo test --workspace: the suite has 3,823 passed, 17 ignored; graphql-js differentials, doctests and unit tests pass. The random-tag tests ondgsandstars-stuffcompare every derived contract with the full per-contract composition.pnpm test:npm: 16/16.cargo doc, with-D warnings.