Skip to content

[Fusion] Fix issue with comparison of directive definitions#9255

Merged
glen-84 merged 2 commits intomainfrom
gai/fix-directive-definition-comparison
Feb 27, 2026
Merged

[Fusion] Fix issue with comparison of directive definitions#9255
glen-84 merged 2 commits intomainfrom
gai/fix-directive-definition-comparison

Conversation

@glen-84
Copy link
Copy Markdown
Member

@glen-84 glen-84 commented Feb 27, 2026

Summary of the changes (Less than 80 chars)

  • [Fusion] Fix issue with comparison of directive definitions.

Copilot AI review requested due to automatic review settings February 27, 2026 14:48
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 27, 2026

Fusion Gateway Performance Results

Simple Composite Query

Req/s Err%
Constant 2 (50 VUs) 3295.14 0.00%
Ramping 2 (0-500-0 VUs) 3943.50 0.00%
Response Times
Min Med Avg P90 P95 Max
Constant 2 1.01ms 12.22ms 14.91ms 24.29ms 33.70ms 252.14ms
Ramping 2 1.24ms 50.96ms 55.70ms 97.98ms 139.32ms 306.56ms

Deep Recursion Query

Req/s Err%
Constant 2 (50 VUs) 791.78 0.00%
Ramping 2 (0-500-0 VUs) 931.11 0.00%
Response Times
Min Med Avg P90 P95 Max
Constant 2 10.14ms 54.65ms 60.97ms 78.16ms 95.53ms 710.67ms
Ramping 2 2.98ms 197.20ms 221.30ms 452.36ms 513.11ms 1021.94ms

Variable Batching Throughput

Req/s Err%
Constant 2 (50 VUs) 5724.78 0.00%
Ramping 2 (0-500-0 VUs) 5206.12 0.00%
Response Times
Min Med Avg P90 P95 Max
Constant 2 0.14ms 8.12ms 8.63ms 14.44ms 17.70ms 58.50ms
Ramping 2 0.18ms 39.82ms 44.11ms 82.17ms 106.25ms 224.52ms

Runner 2 = benchmarking-2

Run 22493289057 • Commit fafadc4 • Fri, 27 Feb 2026 16:00:40 GMT

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

Updates Fusion schema composition to compare directive definitions structurally (ignoring descriptions and argument/location ordering), and aligns adapter test setups/snapshots with the resulting source-schema defaults.

Changes:

  • Replace directive definition equality check in SourceSchemaMerger with a dedicated comparer.
  • Introduce DirectiveDefinitionNodeComparer to compare directive definitions ignoring descriptions and treating arguments/locations as unordered.
  • Update adapter test server setup to apply AddSourceSchemaDefaults() and refresh the NET10 Fusion OpenAPI snapshot accordingly.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/HotChocolate/Fusion-vnext/src/Fusion.Composition/SourceSchemaMerger.cs Uses the new comparer when validating directive definitions against the canonical definition.
src/HotChocolate/Fusion-vnext/src/Fusion.Composition/DirectiveDefinitionNodeComparer.cs Adds structural comparer for directive definitions with order-insensitive argument/location comparison.
src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApiTestBase.cs Applies AddSourceSchemaDefaults() to the test GraphQL server setup.
src/HotChocolate/Adapters/test/Adapters.Mcp.Tests/FusionIntegrationTests.cs Applies AddSourceSchemaDefaults() to the subgraph test server setup.
src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/snapshots/OpenApiIntegrationTestBase.OpenApi_Includes_Initial_Routes_NET10_0_Fusion.json Updates expected OpenAPI output for Fusion NET10.

💡 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