[Fusion] Fix issue with comparison of directive definitions#9255
Merged
[Fusion] Fix issue with comparison of directive definitions#9255
Conversation
Contributor
Fusion Gateway Performance ResultsSimple Composite Query
Response Times
Deep Recursion Query
Response Times
Variable Batching Throughput
Response Times
Runner 2 = benchmarking-2Run 22493289057 • Commit fafadc4 • Fri, 27 Feb 2026 16:00:40 GMT |
Contributor
There was a problem hiding this comment.
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
SourceSchemaMergerwith a dedicated comparer. - Introduce
DirectiveDefinitionNodeComparerto 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.
This was referenced May 1, 2026
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.
Summary of the changes (Less than 80 chars)