Skip to content

Fix #8325 preserve unset Strawberry Shake input field state#9275

Open
michaelstaib wants to merge 2 commits intomainfrom
mst/issue-8325
Open

Fix #8325 preserve unset Strawberry Shake input field state#9275
michaelstaib wants to merge 2 commits intomainfrom
mst/issue-8325

Conversation

@michaelstaib
Copy link
Copy Markdown
Member

Fixes #8325

Summary

  • Adds a regression test that reproduces Strawberry Shake-style runtime setters (_set_* flags) being toggled for unspecified input object fields.
  • Distinguishes missing fields from explicit null during input parsing.
  • Skips property setter invocation for missing non-optional input fields while preserving explicit null behavior.

Repro Test Code

[Fact]
public async Task InputParser_Does_Not_Set_Unspecified_Properties()
{
    var executor = await new ServiceCollection()
        .AddGraphQL()
        .AddQueryType<Issue8325Query>()
        .AddType<Issue8325SortInputType>()
        .BuildRequestExecutorAsync();

    var result = await executor.ExecuteAsync(
        """
        {
          isOnlyIdSet(order: [{ id: ASC }])
        }
        """);

    var json = result.ToJson();
    Assert.DoesNotContain("\"errors\"", json);
    Assert.Contains("\"isOnlyIdSet\": true", json);
}

Tests

  • dotnet test src/HotChocolate/Core/test/Types.Tests/HotChocolate.Types.Tests.csproj -f net8.0 --filter "FullyQualifiedName~Issue8325ProbeTests" (Passed)
  • dotnet test src/HotChocolate/Core/test/Types.Tests/HotChocolate.Types.Tests.csproj -f net9.0 --filter "FullyQualifiedName~Issue8325ProbeTests" (Passed)
  • dotnet test src/HotChocolate/Core/test/Types.Tests/HotChocolate.Types.Tests.csproj -f net10.0 --filter "FullyQualifiedName~Issue8325ProbeTests" (Passed)
  • dotnet test src/HotChocolate/Core/test/Types.Tests/HotChocolate.Types.Tests.csproj -f net8.0 --filter "FullyQualifiedName~InputCoercionTests" (Passed)

@github-actions
Copy link
Copy Markdown
Contributor

Fusion Gateway Performance Results

Progress: 0/6 benchmarks completed — this report updates as each job finishes.

Simple Composite Query

Req/s Err%
Constant 2 (50 VUs) pending pending
Ramping 2 (0-500-0 VUs) pending pending
Response Times
Min Med Avg P90 P95 Max
Constant 2 pending pending pending pending pending pending
Ramping 2 pending pending pending pending pending pending

Deep Recursion Query

Req/s Err%
Constant 2 (50 VUs) pending pending
Ramping 2 (0-500-0 VUs) pending pending
Response Times
Min Med Avg P90 P95 Max
Constant 2 pending pending pending pending pending pending
Ramping 2 pending pending pending pending pending pending

Variable Batching Throughput

Req/s Err%
Constant 2 (50 VUs) pending pending
Ramping 2 (0-500-0 VUs) pending pending
Response Times
Min Med Avg P90 P95 Max
Constant 2 pending pending pending pending pending pending
Ramping 2 pending pending pending pending pending pending

Runner 2 = benchmarking-2

Run 22506557160 • Commit 93a6a30 • Fri, 27 Feb 2026 22:38:09 GMT

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.

InputParsing with Strawberry Shake runtime types

1 participant