Skip to content

[Fusion] Match abstract type conditions in fetch result path walkers - #10065

Merged
michaelstaib merged 2 commits into
mainfrom
mst/fes-4
Jul 8, 2026
Merged

michaelstaib merged 2 commits into
mainfrom
mst/fes-4

Conversation

@michaelstaib

@michaelstaib michaelstaib commented Jul 8, 2026 •

Copy link
Copy Markdown
Member

fixes #10045

Copilot AI review requested due to automatic review settings July 8, 2026 08:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes Fusion fetch-result path walking so inline-fragment type conditions can match abstract types (interfaces/unions) against concrete runtime __typename, addressing #10045 and preventing lookups from being skipped when reached through interface fragments.

Changes:

  • Updated FetchResultStore path walking to treat inline-fragment type conditions as abstract-capable and perform subtype/union-member matching.
  • Added planning tests to ensure lookup targets keep abstract type conditions when reached through interface fragments.
  • Added execution tests + snapshots covering interface inheritance chains and union source-path narrowing by type condition.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Results/FetchResultStore.cs Implements subtype-aware inline-fragment matching for both target and source path walkers.
src/HotChocolate/Fusion/test/Fusion.Execution.Tests/Planning/InterfaceInheritanceLookupPlanningTests.cs Adds regression tests validating abstract vs concrete type conditions in planned fetch targets.
src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/InterfaceInheritanceExecutionTests.cs Adds execution-level coverage for interface inheritance + union lookups/type conditions.
src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/snapshots/InterfaceInheritanceExecutionTests.Execution_Should_ResolveUnionMemberField_When_LookupNarrowsSourcePathByTypeCondition.yaml Snapshot for union source-path narrowing behavior.
src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/snapshots/InterfaceInheritanceExecutionTests.Execution_Should_ResolveProduct_When_LookupReachedThroughTopLevelInterfaceFragment.yaml Snapshot for top-level interface fragment lookup execution.
src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/snapshots/InterfaceInheritanceExecutionTests.Execution_Should_ResolveProduct_When_LookupReachedThroughNestedInterfaceHierarchy.yaml Snapshot for nested interface hierarchy lookup execution.
src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/snapshots/InterfaceInheritanceExecutionTests.Execution_Should_ResolveProduct_When_LookupReachedThroughDirectIntermediateInterfaceFragment.yaml Snapshot for direct intermediate interface fragment lookup execution.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@michaelstaib
michaelstaib merged commit db3fcb4 into main Jul 8, 2026
13 checks passed
@michaelstaib
michaelstaib deleted the mst/fes-4 branch July 8, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Fusion] bug with inheritance

2 participants