Repository navigation
Index the variables object once when coercing variables - #10820
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The review found an issue that should be addressed before approval.
4 open issues
Accessingproperty.Nameallocates a UTF-16 string for every supplied property, including… · New This test has sevenAssert.*calls, exceeding the repository's five-per-test limit. Please split… · New Accessingproperty.Nameallocates a UTF-16 string for every supplied property, including… · New This test has nineAssert.*calls, exceeding the repository's five-per-test limit. Please split… · New
What changed in this PR
Optimizes variable coercion in HotChocolate Core and Fusion by indexing supplied values once for operations declaring more than 16 variables.
Changes:
- Adds lookups containing only declared variables, retaining linear scans for smaller operations.
- Adds regression tests for duplicate and escaped keys, nulls, missing values, defaults, and undeclared variables.
| File | Description |
|---|---|
| src/HotChocolate/Fusion/test/Fusion.Execution.Tests/Execution/VariableCoercionHelperTests.cs | Updated as part of this pull request. |
| src/HotChocolate/Fusion/src/Fusion.Execution/Execution/VariableCoercionHelper.cs | Updated as part of this pull request. |
| src/HotChocolate/Core/test/Execution.Tests/Processing/VariableCoercionHelperTests.cs | Updated as part of this pull request. |
| src/HotChocolate/Core/src/Types/Execution/Processing/VariableCoercionHelper.cs | Updated as part of this pull request. |
Review effort: Balanced
Contributor
Patch coverage100.0% of changed lines covered (80/80)
Project coverage: 59.4% (321377/540670 lines) |
tobias-tengler
force-pushed
the
tte/variable-coercion-lookup
branch
2 times, most recently
from
November 9, 2026 13:17
54e1d0d to
7a09916
Compare
tobias-tengler
force-pushed
the
tte/variable-coercion-lookup
branch
from
November 9, 2026 13:21
7a09916 to
d8f7770
Compare
This was referenced Nov 10, 2026
chore(deps): Bump HotChocolate.Subscriptions.InMemory from 16.7.3 to 16.7.5
Kuestenlogik/Bowire#1025
Merged
This was referenced Nov 19, 2026
fix(deps): Bump Basic.Reference.Assemblies.Net100 and 32 others
AdCodicem/AdCodicem.ValueObjects#262
Closed
This was referenced Nov 26, 2026
fix(deps): Bump Basic.Reference.Assemblies.Net100 and 43 others
AdCodicem/AdCodicem.ValueObjects#274
Closed
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.

No description provided.