[Fusion] Fix introspection argument list misalignment - #10024
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a gateway introspection bug where __Field.args / __Directive.args could leave gaps in the produced list when deprecated arguments were skipped, causing an execution error and dropping subsequent arguments.
Changes:
- Update
__Field.Argumentsand__Directive.Argumentsto iterate source arguments and advance the result-list enumerator only for included entries (avoids index/list-slot misalignment). - Add a regression test covering the “deprecated arg first, non-deprecated arg second” scenario via gateway introspection.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/HotChocolate/Fusion/test/Fusion.Execution.Tests/Execution/Introspection/FieldArgumentsIntrospectionTests.cs | Adds regression coverage ensuring deprecated args are excluded without producing list gaps/errors. |
| src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Introspection/__Field.cs | Fixes __Field.args list materialization to avoid gaps when skipping deprecated args. |
| src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Introspection/__Directive.cs | Fixes __Directive.args list materialization to avoid gaps when skipping deprecated args. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Patch coverage57.1% of changed lines covered (8/14)
Uncovered changed lines (JSON){
"sha": "4611aa28ac1a11e3ab333b36cbe967d024e834c3",
"files": [
{ "path": "src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Introspection/__Directive.cs", "ranges": [[167, 169]] },
{ "path": "src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Introspection/__Field.cs", "ranges": [[90, 92]] }
]
}Project coverage: 52.5% (216951/413145 lines) |
This was referenced Jul 7, 2026
This was referenced Jul 14, 2026
This was referenced Jul 23, 2026
chore(deps): Bump HotChocolate.Subscriptions.InMemory from 15.1.14 to 16.5.1
Kuestenlogik/Bowire#506
Merged
This was referenced Jul 27, 2026
This was referenced Aug 3, 2026
This was referenced Aug 11, 2026
Open
Open
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
__Field.argsand__Directive.argssized their result list to the non-deprecated argument count but iterated the list slots while indexing the full argument list, skipping deprecated arguments withcontinue. A deprecated argument that was not last left an unfilled list slot, which surfaced as an "Unexpected Execution Error" and dropped a trailing argument.enumValuesandinputFieldsresolvers.Test plan
__type.fields.argsreturns only the non-deprecated argument (previously errored).Fusion.Execution.Testssuite passes.