Skip to content

[Fusion] Fix conditionals below shared field#9236

Merged
tobias-tengler merged 11 commits intomainfrom
tte/fix-conditionals-on-shared-fields
Mar 3, 2026
Merged

[Fusion] Fix conditionals below shared field#9236
tobias-tengler merged 11 commits intomainfrom
tte/fix-conditionals-on-shared-fields

Conversation

@tobias-tengler
Copy link
Copy Markdown
Member

No description provided.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 26, 2026

Fusion Gateway Performance Results

Simple Composite Query

Req/s Err%
Constant 1 (50 VUs) 5236.88 0.00%
Ramping 1 (0-500-0 VUs) 5729.08 0.00%
Response Times
Min Med Avg P90 P95 Max
Constant 1 0.59ms 7.83ms 9.41ms 15.58ms 20.93ms 183.01ms
Ramping 1 0.55ms 34.76ms 39.06ms 70.37ms 99.80ms 240.40ms

Deep Recursion Query

Req/s Err%
Constant 1 (50 VUs) 1131.68 0.00%
Ramping 1 (0-500-0 VUs) 1366.61 0.00%
Response Times
Min Med Avg P90 P95 Max
Constant 1 3.49ms 39.14ms 43.02ms 54.80ms 65.45ms 454.59ms
Ramping 1 1.84ms 136.39ms 155.68ms 324.47ms 363.26ms 683.50ms

Variable Batching Throughput

Req/s Err%
Constant 1 (50 VUs) 11743.81 0.00%
Ramping 1 (0-500-0 VUs) 9266.52 0.00%
Response Times
Min Med Avg P90 P95 Max
Constant 1 0.10ms 3.87ms 4.21ms 6.91ms 9.25ms 52.19ms
Ramping 1 0.09ms 21.44ms 24.91ms 46.92ms 64.47ms 173.30ms

Runner 1 = benchmarking-1

Run 22613092164 • Commit b0e98bb • Tue, 03 Mar 2026 08:01:30 GMT

@tobias-tengler tobias-tengler force-pushed the tte/fix-conditionals-on-shared-fields branch from 03ccec6 to 6f20e8a Compare February 27, 2026 10:03
@tobias-tengler tobias-tengler marked this pull request as ready for review March 3, 2026 07:27
Copilot AI review requested due to automatic review settings March 3, 2026 07:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates Fusion’s planning/execution pipeline to correctly propagate @skip/@include conditions through partitioning/backlog work items (notably “below shared field” scenarios), and refreshes/extends the test suite to validate the new behavior.

Changes:

  • Propagate conditional directives into unresolvable selection sets and requirement work items via “conditioned” wrappers, so downstream planned steps inherit the correct execution conditions.
  • Improve planning/path handling for anonymous inline fragments and “empty” operations, and treat fusion__empty selections as internal.
  • Re-enable previously skipped conditional/shared-path tests, add new static-skip coverage, and update snapshots accordingly.

Reviewed changes

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

Show a summary per file
File Description
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/v15/snapshots/DemoIntegrationTests.Field_Below_Shared_Field_Only_Available_On_One_Subgraph_Type_Of_Shared_Field_Not_Node_2.yaml Snapshot updated for revised interaction planning/output.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/v15/snapshots/DemoIntegrationTests.Field_Below_Shared_Field_Only_Available_On_One_Subgraph_Type_Of_Shared_Field_Not_Node_3.yaml Snapshot updated for revised interaction planning/output.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/UnionTests.Union_List_Concrete_Type_Selections_Have_Dependency_To_Same_Subgraph.yaml Snapshot updated for revised batching/ordering in planned execution.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/UnionTests.Object_List_Union_List_Concrete_Type_Selections_Have_Dependency_To_Same_Subgraph.yaml Snapshot updated for revised batching/ordering in planned execution.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/SubscriptionsOverHttpStoreTests.Subscribe_Simple.yaml Snapshot updated (variable value change) to reflect new execution behavior.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/SharedPathTests.Single_Shared_Root_Field_With_Inline_Fragment_Without_TypeCondition.yaml New snapshot covering anonymous inline fragment conditional propagation.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/SharedPathTests.Single_Shared_Root_Field_With_Extra_Fields_On_Root.yaml Snapshot updated for revised interaction grouping/output.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/SharedPathTests.Shared_Parent_Field_Below_Type_With_Lookup_With_Extra_Fields_On_Shared_Level.yaml Snapshot updated for revised interaction grouping/output.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/SharedPathTests.Hierarchy_Of_Shared_Root_Fields_With_Extra_Fields_On_Shared_Level.yaml Snapshot updated for revised interaction grouping/output.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/SharedPathTests.Hierarchy_Of_Shared_Parent_Fields_Below_Type_With_Lookup_With_Extra_Fields_On_Shared_Levels.yaml Snapshot updated for revised interaction grouping/output.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/SharedPathTests.Hierarchy_Of_Shared_Parent_Fields_Below_Type_With_Lookup_With_Extra_Fields_On_Shared_Level.yaml Snapshot updated for revised interaction grouping/output.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/RequireTests.Requirement_On_Property_Within_Nullable_Object_Returning_Null.yaml Snapshot updated for revised requirement/interaction planning.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/RequireTests.Requirement_On_Property_Within_Nullable_Object.yaml Snapshot updated for revised requirement/interaction planning.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/RequireTests.Requirement_On_Nullable_Leaf_Field_Returning_Null.yaml Snapshot updated for revised requirement/interaction planning.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/RequireTests.Requirement_On_Leaf_Field.yaml Snapshot updated for revised requirement/interaction planning.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/InterfaceTests.List_Field_Interface_Object_Property_Linked_Field_With_Dependency_Different_Selection_In_Concrete_Type.yaml Snapshot updated for revised execution ordering/batching.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/InterfaceTests.Interface_List_Field_Linked_Field_With_Dependency_Different_Selection_In_Concrete_Type.yaml Snapshot updated for revised execution ordering/batching.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/InterfaceTests.Interface_Field_Linked_Field_With_Dependency_Different_Selection_In_Concrete_Type.yaml Snapshot updated for revised execution ordering/batching.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/GlobalObjectIdentificationTests.Two_Node_Fields_With_Alias.yaml Snapshot updated for revised interaction grouping/output.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/GlobalObjectIdentificationTests.Node_Field_Selections_On_Interface_And_Concrete_Type_Both_Have_Same_Dependency.yaml Snapshot updated for revised interaction grouping/output.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/ConditionalTests.SharedPath_Multiple_Skip_Levels_Around_Fields_Below_Entry_Field.yaml Snapshot updated; conditions now appear on downstream nodes as expected.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/ConditionalTests.SharedPath_Multiple_Skip_Levels_Around_Entry_Field.yaml Snapshot updated; previously failing case now plans conditionally gated nodes.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/ConditionalTests.Root_Skip_Around_Fields_From_Different_Source_Schemas.yaml Snapshot updated; root-skip condition now attached to execution node(s).
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/ConditionalTests.Root_Multiple_Skip_Levels_Around_Fields_From_Different_Source_Schemas.yaml Snapshot updated; multiple conditions now forwarded/represented.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/ConditionalTests.Root_Field_Statically_Skipped.yaml New snapshot covering statically skipped root field behavior.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/ConditionalTests.NodeField_Skip_On_Interface_Selection_Type_Refinement_With_Same_Unskipped_Selection.yaml Snapshot updated to include conditions/batching group IDs.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/ConditionalTests.NodeField_Skip_On_Interface_Selection.yaml Snapshot updated to include propagated node conditions.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/ConditionalTests.Lookup_Skip_On_Parent_Field_Of_Field_Fetched_Through_Lookup.yaml Snapshot updated to include propagated lookup conditions.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/ConditionalTests.Lookup_Skip_On_Field_With_Requirement.yaml Snapshot updated; requirement-related condition forwarding validated.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/ConditionalTests.Lookup_Skip_Not_Only_On_Field_With_Requirement.yaml Snapshot updated; requirement/lookup condition forwarding validated.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/ConditionalTests.Lookup_Skip_Around_Fields_Fetched_Through_Lookup.yaml Snapshot updated; lookup subtree conditions now represented.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/ConditionalTests.Lookup_Skip_Around_Field_With_Requirement_With_Other_Field.yaml Snapshot updated; mixed requirement/field conditions now represented.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/ConditionalTests.Lookup_Multiple_Skip_Levels_Around_Fields_Fetched_Through_Lookup_And_On_Same_Source_Schema.yaml Snapshot updated; multiple conditions propagated to lookup step.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/ConditionalTests.Lookup_Multiple_Skip_Levels_Around_Fields_Fetched_Through_Lookup.yaml Snapshot updated; multiple conditions propagated to lookup step.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/ConditionalTests.All_Selections_On_A_Field_Statically_Skipped.yaml New snapshot covering statically skipped nested selection behavior.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/SharedPathTests.cs Re-enables the previously skipped shared-path inline-fragment test.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/ConditionalTests.cs Re-enables multiple conditional tests and adds a new static-skip test.
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/FusionTestBase.cs Adjusts interaction capture to correlate grouped HTTP requests to a stable interaction id.
src/HotChocolate/Fusion-vnext/src/Fusion.Execution/Planning/Partitioners/SelectionSetPartitionerResult.cs Extends partitioner result to carry condition-aware unresolvable/requirement selections.
src/HotChocolate/Fusion-vnext/src/Fusion.Execution/Planning/Partitioners/SelectionSetPartitioner.cs Extracts directive conditions during partitioning and snapshots them onto backlog entries.
src/HotChocolate/Fusion-vnext/src/Fusion.Execution/Planning/Partitioners/ConditionedSelectionSet.cs New wrapper type to associate selection sets with execution conditions.
src/HotChocolate/Fusion-vnext/src/Fusion.Execution/Planning/Partitioners/ConditionedFieldSelection.cs New wrapper type to associate requirement field selections with execution conditions.
src/HotChocolate/Fusion-vnext/src/Fusion.Execution/Planning/OperationWorkItem.cs Adds condition propagation to operation backlog work items.
src/HotChocolate/Fusion-vnext/src/Fusion.Execution/Planning/FieldWithRequirementWorkItem.cs Adds condition propagation to field-requirement backlog work items.
src/HotChocolate/Fusion-vnext/src/Fusion.Execution/Planning/Backlog.cs Propagates conditions when pushing unresolvable selection sets and requirement work items.
src/HotChocolate/Fusion-vnext/src/Fusion.Execution/Planning/OperationPlanner.cs Threads work-item conditions through lookup/requirement planning and supports anonymous fragments in path reversal.
src/HotChocolate/Fusion-vnext/src/Fusion.Execution/Planning/OperationPlanner.BuildExecutionTree.cs Improves handling of empty operations, conditional extraction/merge, and internal introspection behavior.
src/HotChocolate/Fusion-vnext/src/Fusion.Execution/Execution/Nodes/OperationCompiler.cs Treats fusion__empty as an internal directive (like fusion__requirement).

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

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.

2 participants