-
-
Notifications
You must be signed in to change notification settings - Fork 801
Import JsonMarshal through System.Text.Json #9060
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request attempts to replace a custom JsonMarshal polyfill with the native System.Text.Json.JsonMarshal implementation by upgrading System.Text.Json to version 10.0.0 and removing the polyfill code.
Changes:
- Added Directory.Build.user.props file with Nitro API credentials (should not be committed)
- Removed JsonMarshal.cs polyfill from Utilities.Buffers
- Added System.Text.Json package references to HotChocolate.Language.Web.csproj
- Updated System.Text.Json and related package versions to 10.0.0
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Nitro/CommandLine/src/CommandLine/Directory.Build.user.props | Adds user-specific build configuration with API credentials - should not be committed |
| src/HotChocolate/Utilities/src/Utilities.Buffers/Polyfills/JsonMarshal.cs | Removes JsonMarshal polyfill that provided compatibility for pre-.NET 9.0 frameworks |
| src/HotChocolate/Language/src/Language.Web/HotChocolate.Language.Web.csproj | Adds System.Text.Json package reference for net8.0 and netstandard2.0 targets |
| src/Directory.Packages.props | Updates System.Text.Json and related package versions to 10.0.0 across multiple target frameworks |
Comments suppressed due to low confidence (1)
src/HotChocolate/Utilities/src/Utilities.Buffers/Polyfills/JsonMarshal.cs:1
- The JsonMarshal polyfill is being completely removed, but it's still being used throughout the codebase in files that target net8.0 and netstandard2.0. JsonMarshal was added to System.Text.Json in .NET 9.0, but this codebase also targets net8.0 and netstandard2.0. Without this polyfill, code using JsonMarshal.GetRawUtf8Value() will fail to compile on net8.0 and netstandard2.0 targets. Files using JsonMarshal include: JsonValueParser.cs, JsonType.cs, GraphQLOverWebSocketProtocolHandler.cs, and FileSystemFusionConfigurationProvider.cs. The polyfill should be conditionally compiled for pre-.NET 9.0 frameworks only (using
#if !NET9_0_OR_GREATER) instead of being deleted entirely.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <ItemGroup Condition="'$(TargetFramework)' == 'net8.0'"> | ||
| <PackageReference Include="System.Text.Json" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'"> | ||
| <PackageReference Include="System.Text.Json" /> | ||
| </ItemGroup> | ||
|
|
Copilot
AI
Jan 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These duplicate ItemGroup conditions for System.Text.Json package reference can be consolidated into a single ItemGroup that applies to both net8.0 and netstandard2.0. The duplication is unnecessary and makes the configuration harder to maintain.
| <ItemGroup Condition="'$(TargetFramework)' == 'net8.0'"> | |
| <PackageReference Include="System.Text.Json" /> | |
| </ItemGroup> | |
| <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'"> | |
| <PackageReference Include="System.Text.Json" /> | |
| </ItemGroup> | |
| <ItemGroup Condition="'$(TargetFramework)' == 'net8.0' Or '$(TargetFramework)' == 'netstandard2.0'"> | |
| <PackageReference Include="System.Text.Json" /> | |
| </ItemGroup> |
f637487 to
12ab165
Compare
🚀 Fusion Gateway Performance ResultsSimple Composite QueryConstant Load (50 VUs)
📊 Response Time Metrics
Ramping Load (0→50→500→50 VUs)
📊 Response Time Metrics
Executed Query fragment User on User {
id
username
name
}
fragment Review on Review {
id
body
}
fragment Product on Product {
inStock
name
price
shippingEstimate
upc
weight
}
query TestQuery {
topProducts(first: 5) {
...Product
reviews {
...Review
author {
...User
}
}
}
}Deep Recursion QueryConstant Load (50 VUs)
📊 Response Time Metrics
Ramping Load (0→50→500→50 VUs)
📊 Response Time Metrics
Executed Query fragment User on User {
id
username
name
}
fragment Review on Review {
id
body
}
fragment Product on Product {
inStock
name
price
shippingEstimate
upc
weight
}
query TestQuery {
users {
...User
reviews {
...Review
product {
...Product
reviews {
...Review
author {
...User
reviews {
...Review
product {
...Product
}
}
}
}
}
}
}
topProducts(first: 5) {
...Product
reviews {
...Review
author {
...User
reviews {
...Review
product {
...Product
}
}
}
}
}
}Variable Batching ThroughputConstant Load (50 VUs)
📊 Response Time Metrics
Ramping Load (0→50→500→50 VUs)
📊 Response Time Metrics
Executed Query query TestQuery_8f7a46ce_2(
$__fusion_1_upc: ID!
$__fusion_2_price: Long!
$__fusion_2_weight: Long!
) {
productByUpc(upc: $__fusion_1_upc) {
inStock
shippingEstimate(weight: $__fusion_2_weight, price: $__fusion_2_price)
}
}Variables (5 sets batched in single request) [
{ "__fusion_1_upc": "1", "__fusion_2_price": 899, "__fusion_2_weight": 100 },
{ "__fusion_1_upc": "2", "__fusion_2_price": 1299, "__fusion_2_weight": 1000 },
{ "__fusion_1_upc": "3", "__fusion_2_price": 15, "__fusion_2_weight": 20 },
{ "__fusion_1_upc": "4", "__fusion_2_price": 499, "__fusion_2_weight": 100 },
{ "__fusion_1_upc": "5", "__fusion_2_price": 1299, "__fusion_2_weight": 1000 }
]No baseline data available for comparison. Run 21290575461 • Commit d608f59 • Fri, 23 Jan 2026 15:20:18 GMT |
12ab165 to
235b52e
Compare
🚀 Fusion Gateway Performance ResultsSimple Composite QueryConstant Load (50 VUs)
📊 Response Time Metrics
Ramping Load (0→50→500→50 VUs)
📊 Response Time Metrics
Executed Query fragment User on User {
id
username
name
}
fragment Review on Review {
id
body
}
fragment Product on Product {
inStock
name
price
shippingEstimate
upc
weight
}
query TestQuery {
topProducts(first: 5) {
...Product
reviews {
...Review
author {
...User
}
}
}
}Deep Recursion QueryConstant Load (50 VUs)
📊 Response Time Metrics
Ramping Load (0→50→500→50 VUs)
📊 Response Time Metrics
Executed Query fragment User on User {
id
username
name
}
fragment Review on Review {
id
body
}
fragment Product on Product {
inStock
name
price
shippingEstimate
upc
weight
}
query TestQuery {
users {
...User
reviews {
...Review
product {
...Product
reviews {
...Review
author {
...User
reviews {
...Review
product {
...Product
}
}
}
}
}
}
}
topProducts(first: 5) {
...Product
reviews {
...Review
author {
...User
reviews {
...Review
product {
...Product
}
}
}
}
}
}Variable Batching ThroughputConstant Load (50 VUs)
📊 Response Time Metrics
Ramping Load (0→50→500→50 VUs)
📊 Response Time Metrics
Executed Query query TestQuery_8f7a46ce_2(
$__fusion_1_upc: ID!
$__fusion_2_price: Long!
$__fusion_2_weight: Long!
) {
productByUpc(upc: $__fusion_1_upc) {
inStock
shippingEstimate(weight: $__fusion_2_weight, price: $__fusion_2_price)
}
}Variables (5 sets batched in single request) [
{ "__fusion_1_upc": "1", "__fusion_2_price": 899, "__fusion_2_weight": 100 },
{ "__fusion_1_upc": "2", "__fusion_2_price": 1299, "__fusion_2_weight": 1000 },
{ "__fusion_1_upc": "3", "__fusion_2_price": 15, "__fusion_2_weight": 20 },
{ "__fusion_1_upc": "4", "__fusion_2_price": 499, "__fusion_2_weight": 100 },
{ "__fusion_1_upc": "5", "__fusion_2_price": 1299, "__fusion_2_weight": 1000 }
]No baseline data available for comparison. Run 21291755894 • Commit 5a8209c • Fri, 23 Jan 2026 16:14:16 GMT |
No description provided.