Repository navigation
Fix Fusion require subtree routed to non-owning schema - #10184
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR tightens Fusion’s requirement inlining logic so that a requirement subtree is only folded into an existing planned fetch when the chosen source schema can actually resolve the full connector chain (fields + type conditions) down to the requirement target. This prevents the planner from generating subgraph documents that reference intermediate fields/fragments not declared by that subgraph.
Changes:
- Added a connector-chain resolvability check when selecting an ancestor step to inline requirements into (
OperationPlanner). - Added a regression test covering a case where the entry schema declares a nested lookup but does not own the required subtree (
RequirementReentrancyTests).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/HotChocolate/Fusion/test/Fusion.Execution.Tests/Planning/RequirementReentrancyTests.cs | Adds a regression test and composed schema setup to ensure require subtrees stay in the owning subgraph even when another subgraph declares adjacent lookups. |
| src/HotChocolate/Fusion/src/Fusion.Execution/Planning/OperationPlanner.cs | Ensures ancestor-step requirement inlining only happens when the candidate schema can resolve the full connector chain (rejects invalid inlining into non-owning schemas). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Patch coverage91.7% of changed lines covered (22/24)
Uncovered changed lines (JSON){
"sha": "f8a71b9886136d67ed552b833eabdaec2582ed52",
"files": [
{ "path": "src/HotChocolate/Fusion/src/Fusion.Execution/Planning/OperationPlanner.cs", "ranges": [[4117, 4118]] }
]
}Project coverage: 54.0% (237568/439994 lines) |
This was referenced Aug 6, 2026
Merged
This was referenced Aug 13, 2026
Closed
Closed
This was referenced Aug 25, 2026
Closed
This was referenced Sep 1, 2026
Closed
This was referenced Sep 15, 2026
Closed
[nuget][SUI_Matcher]- Bump the sui-package-updates group with 20 updates
DFE-Digital/SUI_Matcher#405
Closed
This was referenced Sep 22, 2026
Closed
Closed
[nuget][SUI_Matcher]- Bump the sui-package-updates group with 20 updates
DFE-Digital/SUI_Matcher#410
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.
Fixes #10183