Skip to content

[Fusion] Fixed satisfiability issue with fields on the Query type#9076

Merged
glen-84 merged 1 commit intomainfrom
gai/query-type-satisfiability-issue
Jan 29, 2026
Merged

[Fusion] Fixed satisfiability issue with fields on the Query type#9076
glen-84 merged 1 commit intomainfrom
gai/query-type-satisfiability-issue

Conversation

@glen-84
Copy link
Copy Markdown
Member

@glen-84 glen-84 commented Jan 29, 2026

Summary of the changes (Less than 80 chars)

  • [Fusion] Fixed satisfiability issue with fields on the Query type.

Copilot AI review requested due to automatic review settings January 29, 2026 13:23
@glen-84 glen-84 merged commit cf15002 into main Jan 29, 2026
119 of 120 checks passed
@glen-84 glen-84 deleted the gai/query-type-satisfiability-issue branch January 29, 2026 13:31
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 a bug in the satisfiability validator that caused validation to fail when fields on the Query type (root type) had @require directives. The issue occurred because the code attempted to peek at the path stack when it was empty for root-level fields.

Changes:

  • Fixed null handling when validating requirements on root Query type fields
  • Made the parentPathItem parameter nullable throughout the validation chain
  • Added test coverage for the root requirement scenario

Reviewed changes

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

File Description
SatisfiabilityValidator.cs Changed to pass previousPathItem (which is null-safe) instead of calling context.Path.Peek() when validating requirements
RequirementsValidator.cs Updated Validate method signature to accept nullable parentPathItem and modified constructor to conditionally push parent path item only when non-null
SatisfiabilityValidatorTests.cs Added RootRequirement test case that verifies a Query field with @require directive referencing another Query field validates successfully

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

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Fusion Gateway Performance Results

Simple Composite Query

Constant Load (50 VUs)

Requests/sec Error Rate
5807.28 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.81ms 7.18ms 162.52ms 8.46ms 13.07ms 18.81ms

Ramping Load (0→50→500→50 VUs)

Requests/sec Error Rate
4562.65 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.84ms 38.84ms 261.40ms 48.66ms 108.27ms 125.66ms

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 Query

Constant Load (50 VUs)

Requests/sec Error Rate
269.47 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
13.02ms 174.32ms 752.09ms 179.91ms 224.72ms 248.36ms

Ramping Load (0→50→500→50 VUs)

Requests/sec Error Rate
299.87 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
3.09ms 706.18ms 1687.66ms 704.99ms 1401.17ms 1507.93ms

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 Throughput

Constant Load (50 VUs)

Requests/sec Error Rate
23708.81 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.09ms 1.70ms 45.78ms 2.06ms 3.92ms 4.80ms

Ramping Load (0→50→500→50 VUs)

Requests/sec Error Rate
18672.75 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.09ms 9.28ms 107.79ms 11.26ms 23.16ms 27.94ms

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 21479822483 • Commit 4233a58 • Thu, 29 Jan 2026 13:41:29 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