Fix Fusion defer patches when delivery path crosses intermediate lists - #10189
Merged
michaelstaib merged 3 commits intoAug 3, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes Fusion @defer incremental patch generation when the delivery path traverses one or more intermediate list fields, ensuring the pending path stops at the first list boundary and the emitted patches use subPath to address concrete list elements.
Changes:
- Compute per-delivery-group “pending paths” that stop at the first list field, plus metadata used to build correct
subPathvalues. - Rework incremental result creation to recursively emit patches for descendants under list elements (field/index
subPathsegments). - Add a regression test and snapshot covering defer delivery across intermediate lists.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/HotChocolate/Fusion/src/Fusion.Execution/Execution/OperationPlanExecutor.cs |
Introduces delivery-path computation and updates incremental patch emission to correctly handle paths that cross list boundaries. |
src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/DeferTests.cs |
Adds a regression test covering @defer delivery when the path crosses intermediate lists. |
src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/DeferTests.Defer_Should_Return_Patches_When_Path_Crosses_Intermediate_Lists.yaml |
Captures the expected stable-stream response shape (pending path + per-element incremental patches). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Patch coverage64.4% of changed lines covered (130/202)
Uncovered changed lines (JSON){
"sha": "beb7fb287896fcfe50e6cafd4a80f86c0ca620f3",
"files": [
{ "path": "src/HotChocolate/Fusion/src/Fusion.Execution/Execution/OperationPlanExecutor.cs", "ranges": [[772, 773], [777, 782], [785, 787], [797, 799], [841, 841], [843, 853], [855, 856], [859, 867], [872, 874], [881, 886], [889, 892], [895, 897], [899, 899], [901, 902], [923, 924], [1007, 1018], [1023, 1024]] }
]
}Project coverage: 54.3% (242044/445363 lines) |
michaelstaib
deleted the
mst/fix-defer-patches-across-intermediate-lists
branch
August 3, 2026 19:58
This was referenced Aug 9, 2026
Merged
Open
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.
No description provided.