Skip to content

Fix UseProjection with JsonDocument nested field selection#9210

Merged
michaelstaib merged 3 commits intomainfrom
mst/issue-5893
Feb 25, 2026
Merged

Fix UseProjection with JsonDocument nested field selection#9210
michaelstaib merged 3 commits intomainfrom
mst/issue-5893

Conversation

@michaelstaib
Copy link
Copy Markdown
Member

Overview

  • fix projection field handling to keep the original nested value when a nested scope has no projectable members
  • avoid creating invalid member-init expressions for read-only nested types such as JsonDocument
  • add regression coverage for issue JsonDocument problem when using [UseProjection] #5893 ([UseProjection] + JsonDocument + nested rootElement selection)

Verification

  • dotnet test src/HotChocolate/Data/test/Data.Tests/HotChocolate.Data.Tests.csproj --filter "FullyQualifiedName~Issue5893Tests"
  • dotnet test src/HotChocolate/Data/test/Data.Tests/HotChocolate.Data.Tests.csproj --filter "FullyQualifiedName~IntegrationTests" --framework net10.0

Fixes #5893

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 25, 2026

Fusion Gateway Performance Results

Simple Composite Query

Req/s Err%
Constant 2 (50 VUs) 4045.48 0.00%
Ramping 2 (0-500-0 VUs) 3858.74 0.00%
Response Times
Min Med Avg P90 P95 Max
Constant 2 1.01ms 9.72ms 12.14ms 20.39ms 28.47ms 243.52ms
Ramping 2 1.28ms 51.61ms 56.73ms 98.01ms 139.80ms 288.33ms

Deep Recursion Query

Req/s Err%
Constant 2 (50 VUs) 673.39 0.00%
Ramping 2 (0-500-0 VUs) 775.82 0.00%
Response Times
Min Med Avg P90 P95 Max
Constant 2 7.91ms 64.24ms 71.65ms 91.36ms 111.29ms 862.94ms
Ramping 2 3.26ms 238.60ms 264.41ms 555.99ms 621.39ms 985.01ms

Variable Batching Throughput

Req/s Err%
Constant 2 (50 VUs) 5438.47 0.00%
Ramping 2 (0-500-0 VUs) 5387.53 0.00%
Response Times
Min Med Avg P90 P95 Max
Constant 2 0.16ms 8.59ms 9.08ms 15.24ms 18.12ms 58.46ms
Ramping 2 0.19ms 38.16ms 42.64ms 79.67ms 102.64ms 211.97ms

Runner 2 = benchmarking-2

Run 22414006389 • Commit 9140f41 • Wed, 25 Feb 2026 20:22:47 GMT

@michaelstaib michaelstaib added the 🎬 ready Ready to merge label Feb 25, 2026
@michaelstaib michaelstaib merged commit ec35cfa into main Feb 25, 2026
126 checks passed
@michaelstaib michaelstaib deleted the mst/issue-5893 branch February 25, 2026 20:26
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (6a3b7a3) to head (ffeb7b0).
⚠️ Report is 815 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #9210       +/-   ##
==========================================
- Coverage   74.16%       0   -74.17%     
==========================================
  Files        2677       0     -2677     
  Lines      140790       0   -140790     
  Branches    16371       0    -16371     
==========================================
- Hits       104421       0   -104421     
+ Misses      30774       0    -30774     
+ Partials     5595       0     -5595     
Flag Coverage Δ
unittests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JsonDocument problem when using [UseProjection]

1 participant