Skip to content

Fix node extension resolvers with non-id first parameter#9194

Merged
michaelstaib merged 2 commits intomainfrom
mst/issue-4522
Feb 24, 2026
Merged

Fix node extension resolvers with non-id first parameter#9194
michaelstaib merged 2 commits intomainfrom
mst/issue-4522

Conversation

@michaelstaib
Copy link
Copy Markdown
Member

What

  • fix node resolver parameter binding for [Node] extension resolvers when the first resolver parameter is not named id
  • keep existing id-name behavior intact and only apply fallback when no explicit id parameter exists
  • add regression coverage for node(id: ...) executing a [NodeResolver] method with userId

Why

Validation

  • dotnet test src/HotChocolate/Core/test/Types.Tests/HotChocolate.Types.Tests.csproj --filter "FullyQualifiedName~NodeResolverTests.NodeAttribute_On_Extension_Fetch_Through_Node_Field_With_NonId_Argument_Name" --nologo
  • dotnet test src/HotChocolate/Core/test/Types.Tests/HotChocolate.Types.Tests.csproj --filter "FullyQualifiedName~NodeTypeTests.Infer_Node_From_Query_Field_With_Abc_Argument_Resolve_" --nologo
  • dotnet test src/HotChocolate/Core/test/Types.Tests/HotChocolate.Types.Tests.csproj --filter "FullyQualifiedName~NodeResolverTests.NodeResolver_And_AsSelector" --nologo

@michaelstaib michaelstaib merged commit 797873b into main Feb 24, 2026
5 checks passed
@michaelstaib michaelstaib deleted the mst/issue-4522 branch February 24, 2026 22:40
@github-actions
Copy link
Copy Markdown
Contributor

Fusion Gateway Performance Results

Simple Composite Query

Req/s Err%
Constant (50 VUs) 6902.03 0.00%
Ramping (0-500-0 VUs) 7353.02 0.00%
Response Times & Query
Min Med Avg P90 P95 Max
Constant 0.58ms 5.96ms 7.10ms 11.10ms 15.72ms 177.44ms
Ramping 0.59ms 24.09ms 30.06ms 64.11ms 77.25ms 187.73ms
query TestQuery {
  topProducts(first: 5) {
    inStock
    name
    price
    shippingEstimate
    upc
    weight
    reviews {
      id
      body
      author {
        id
        username
        name
      }
    }
  }
}

Deep Recursion Query

Req/s Err%
Constant (50 VUs) 1280.51 0.00%
Ramping (0-500-0 VUs) 1356.27 0.00%
Response Times & Query
Min Med Avg P90 P95 Max
Constant 4.05ms 34.16ms 37.92ms 51.85ms 61.28ms 405.13ms
Ramping 1.85ms 134.64ms 156.86ms 334.63ms 376.50ms 613.82ms
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

Req/s Err%
Constant (50 VUs) 23643.64 0.00%
Ramping (0-500-0 VUs) 18516.97 0.00%
Response Times & Query
Min Med Avg P90 P95 Max
Constant 0.08ms 1.72ms 2.07ms 3.98ms 4.82ms 39.82ms
Ramping 0.08ms 9.43ms 11.42ms 23.45ms 28.32ms 118.61ms
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 22373192883 • Commit 0f0f004 • Wed, 25 Feb 2026 01:30:27 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.

NodeResolver can't handle parameter names other than id

1 participant