[Fusion] Fix SourceResultDocument reading of arrays#9170
Merged
tobias-tengler merged 3 commits intomainfrom Feb 20, 2026
Merged
[Fusion] Fix SourceResultDocument reading of arrays#9170tobias-tengler merged 3 commits intomainfrom
tobias-tengler merged 3 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes SourceResultDocument raw JSON slicing for array values so that array/empty-array extensions can be parsed and forwarded correctly (addressing #9169 where empty arrays could trigger ServerParseError).
Changes:
- Fix raw-value boundary calculation for composite JSON values by correctly handling
EndArraytokens. - Add/extend tests to cover raw text extraction for arrays and forwarding of extension values including empty arrays.
- Improve debugger visualization for
SourceResultDocument/SourceResultProperty.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/HotChocolate/Fusion-vnext/src/Fusion.Execution/Text/Json/SourceResultDocument.Text.cs |
Fixes end-token length computation so raw extraction includes the closing ] for arrays. |
src/HotChocolate/Fusion-vnext/src/Fusion.Execution/Text/Json/SourceResultDocument.cs |
Adds DebuggerDisplay to show document content during debugging. |
src/HotChocolate/Fusion-vnext/src/Fusion.Execution/Text/Json/SourceResultProperty.cs |
Adjusts debugger display formatting for properties. |
src/HotChocolate/Fusion-vnext/test/Fusion.Execution.Tests/Text/Json/SourceResultDocumentTests.cs |
Adds a regression test validating GetRawText/GetRawValueAsMemory for arrays. |
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/SourceSchemaErrorTests.cs |
Extends error extensions to include scalar, array, and empty-array values. |
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_Extensions_From_Source_Schema_Are_Properly_Forwarded.yaml |
Updates snapshot to include the new forwarded extension values. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Fusion Gateway Performance ResultsSimple Composite Query
Response Times & Query
query TestQuery {
topProducts(first: 5) {
inStock
name
price
shippingEstimate
upc
weight
reviews {
id
body
author {
id
username
name
}
}
}
}Deep Recursion Query
Response Times & Query
query TestQuery {
users {
id
username
name
reviews {
id
body
product {
inStock
name
price
shippingEstimate
upc
weight
reviews {
id
body
author {
id
username
name
reviews {
id
body
product {
inStock
name
price
shippingEstimate
upc
weight
}
}
}
}
}
}
}
topProducts(first: 5) {
inStock
name
price
shippingEstimate
upc
weight
reviews {
id
body
author {
id
username
name
reviews {
id
body
product {
inStock
name
price
shippingEstimate
upc
weight
}
}
}
}
}
}Variable Batching Throughput
Response Times & Query
query TestQuery($upc: ID!, $price: Long!, $weight: Long!) {
productByUpc(upc: $upc) {
inStock
shippingEstimate(weight: $weight, price: $price)
}
}Variables (5 sets batched per request) [
{ "upc": "1", "price": 899, "weight": 100 },
{ "upc": "2", "price": 1299, "weight": 1000 },
{ "upc": "3", "price": 15, "weight": 20 },
{ "upc": "4", "price": 499, "weight": 100 },
{ "upc": "5", "price": 1299, "weight": 1000 }
]Run 22233912726 • Commit e415395 • Fri, 20 Feb 2026 17:39:28 GMT |
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.
Fixes #9169