Repository navigation
[Fusion] Merge identical Apollo entity lookups across target paths - #10607
Merged
Merged
Conversation
Contributor
Patch coverage78.8% of changed lines covered (313/397)
Uncovered changed lines (JSON){
"sha": "28ff71390a02bb201ae1aba6d872c9c24d78670e",
"files": [
{ "path": "src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Nodes/ApolloOperationExecutionNode.cs", "ranges": [[243, 243]] },
{ "path": "src/HotChocolate/Fusion/src/Fusion.Execution/Execution/ThrowHelper.cs", "ranges": [[86, 86], [89, 89], [92, 92]] },
{ "path": "src/HotChocolate/Fusion/src/Fusion.Execution/Execution/OperationPlanContext.cs", "ranges": [[564, 570], [581, 582], [598, 599], [601, 601], [604, 604]] },
{ "path": "src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Nodes/ApolloOperationBatchExecutionNode.cs", "ranges": [[160, 162], [168, 170], [206, 208], [214, 216], [219, 222], [224, 229], [233, 238], [258, 263], [265, 265], [267, 272], [274, 276], [278, 280], [583, 584], [595, 595], [651, 651], [659, 659]] },
{ "path": "src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Results/FetchResultStore.RepresentationValue.cs", "ranges": [[170, 171], [194, 195]] },
{ "path": "src/HotChocolate/Fusion/src/Fusion.Execution/Planning/OperationPlanner.BuildExecutionTree.cs", "ranges": [[1619, 1619], [1650, 1651], [1679, 1684], [2072, 2073]] }
]
}Project coverage: 59.1% (313178/529511 lines) |
This was referenced Oct 19, 2026
tobias-tengler
force-pushed
the
tte/fusion-merge-apollo-entity-lookups
branch
from
October 20, 2026 15:20
e8ad0c7 to
9510133
Compare
tobias-tengler
marked this pull request as ready for review
October 20, 2026 15:56
…paths Covers planning, JSON plan round-trip and subgraph requests for structurally identical Apollo _entities lookups that target different paths. The snapshots record the current behavior: one _entities operation per target path.
Structurally identical Apollo _entities lookups that target the same source schema and sit at the same dependency depth now merge into one multi-target lookup with one deduplicated representation list, like the composite-schema merge. Bumps OperationPlanner.Version to 2.3.0 and the operation plan JSON format to 1.2.0 (ApolloOperationBatch entries may carry targets).
tobias-tengler
force-pushed
the
tte/fusion-merge-apollo-entity-lookups
branch
from
October 20, 2026 16:35
04b8a34 to
f49f66f
Compare
This was referenced Oct 25, 2026
Merged
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.
Apollo Federation lookups for the same entity at the same dependency depth are sent as a separate
_entitiesoperation per target path, even when they are structurally identical. For the apollo-federation benchmark query this means 13 subgraph operations across the 7 HTTP requests, with the same representations sent several times.This PR merges structurally identical Apollo lookups (same source schema, entity type, requirements, selections and dependency depth) into one multi-target lookup with one deduplicated representation list, as the planner already does for composite-schema lookups. Lookups at the same schema and depth already share a request batch, so the merge adds no waits and no selections to any lookup.
OperationPlanner.Versiongoes to 2.3.0 and the operation plan JSON format to 1.2.0, sinceApolloOperationBatchentries can now carrytargets.main