Skip to content

[Fusion] Only visit input objects once while building the execution tree#9189

Merged
tobias-tengler merged 1 commit intomainfrom
tte/fusion-handle-recursive-inputs
Feb 24, 2026
Merged

[Fusion] Only visit input objects once while building the execution tree#9189
tobias-tengler merged 1 commit intomainfrom
tte/fusion-handle-recursive-inputs

Conversation

@tobias-tengler
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings February 24, 2026 16:25
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 PR fixes an infinite loop issue in the operation planner when processing recursive input object types. The fix adds cycle detection using a visited set to ensure each input object type is only processed once while traversing the type graph to check for Upload scalars.

Changes:

  • Added cycle detection in DoVariablesContainUploadScalar method using a HashSet with ReferenceEqualityComparer
  • Added integration test for recursive input object types
  • Added snapshot for the recursive input object type test

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/HotChocolate/Fusion-vnext/src/Fusion.Execution/Planning/OperationPlanner.BuildExecutionTree.cs Adds visited HashSet to prevent infinite loop when traversing recursive input object types
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/IntegrationTests.cs Adds new integration test for recursive input object type handling
src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/snapshots/IntegrationTests.Recursive_Input_Object_Type.yaml Adds snapshot for the recursive input object type test

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tobias-tengler tobias-tengler merged commit af998c9 into main Feb 24, 2026
121 checks passed
@tobias-tengler tobias-tengler deleted the tte/fusion-handle-recursive-inputs branch February 24, 2026 16:39
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (147298a) to head (2a42886).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@     Coverage Diff      @@
##   main   #9189   +/-   ##
============================
============================

☔ 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.

@github-actions
Copy link
Copy Markdown
Contributor

Fusion Gateway Performance Results

Simple Composite Query

Req/s Err%
Constant (50 VUs) 7004.32 0.00%
Ramping (0-500-0 VUs) 7364.26 0.00%
Response Times & Query
Min Med Avg P90 P95 Max
Constant 0.57ms 5.93ms 7.00ms 10.75ms 15.40ms 177.90ms
Ramping 0.54ms 24.29ms 29.96ms 63.81ms 76.58ms 202.17ms
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) 1290.82 0.00%
Ramping (0-500-0 VUs) 1354.11 0.00%
Response Times & Query
Min Med Avg P90 P95 Max
Constant 4.64ms 34.04ms 37.61ms 51.41ms 60.53ms 431.50ms
Ramping 1.82ms 130.98ms 156.57ms 337.51ms 387.74ms 827.97ms
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) 23698.29 0.00%
Ramping (0-500-0 VUs) 18625.83 0.00%
Response Times & Query
Min Med Avg P90 P95 Max
Constant 0.08ms 1.71ms 2.06ms 3.96ms 4.80ms 41.44ms
Ramping 0.08ms 9.22ms 11.24ms 23.16ms 27.96ms 105.44ms
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 22359942335 • Commit db26327 • Tue, 24 Feb 2026 16:44:12 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.

2 participants