Skip to content

Add unsigned scalars to MCP tests#9182

Merged
glen-84 merged 1 commit intomainfrom
gai/test-unsigned
Feb 24, 2026
Merged

Add unsigned scalars to MCP tests#9182
glen-84 merged 1 commit intomainfrom
gai/test-unsigned

Conversation

@glen-84
Copy link
Copy Markdown
Member

@glen-84 glen-84 commented Feb 24, 2026

Summary of the changes (Less than 80 chars)

  • Add unsigned scalars to MCP tests.

Copilot AI review requested due to automatic review settings February 24, 2026 09:40
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 adds support for unsigned scalar types (UnsignedByte, UnsignedInt, UnsignedLong, UnsignedShort) to the MCP (Model Context Protocol) adapter tests and enhances JSON schema generation by adding min/max constraints for all integer and numeric scalar types.

Changes:

  • Added min/max constraint handling for GraphQL scalar types in JSON schema generation
  • Extended test coverage to include unsigned scalar types (UnsignedByte, UnsignedInt, UnsignedLong, UnsignedShort)
  • Updated all related test snapshots to reflect the new JSON schema constraints

Reviewed changes

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

Show a summary per file
File Description
TypeExtensions.cs Added TryGetJsonSchemaMinimum and TryGetJsonSchemaMaximum methods to map GraphQL scalars to their min/max values for JSON schema generation
TestSchema.cs Updated test query methods to include unsigned scalar parameters in nullable, non-nullable, and defaulted variants
GetWithNullableVariables.graphql Added unsigned scalar variable declarations to the GraphQL query
GetWithNonNullableVariables.graphql Added non-nullable unsigned scalar variable declarations to the GraphQL query
GetWithDefaultedVariables.graphql Added unsigned scalar variables with default values to the GraphQL query
IntegrationTestBase.cs Updated integration tests to pass test values for unsigned scalars
All snapshot files (10 files) Updated expected JSON schemas to include min/max constraints for integer/numeric types and new unsigned scalar fields

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

@glen-84 glen-84 merged commit 13c5200 into main Feb 24, 2026
121 checks passed
@glen-84 glen-84 deleted the gai/test-unsigned branch February 24, 2026 09:46
@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 (3905062) to head (a5d3b6f).
⚠️ Report is 1 commits behind head on main.

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

☔ 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) 2949.05 0.00%
Ramping (0-500-0 VUs) 3199.47 0.00%
Response Times & Query
Min Med Avg P90 P95 Max
Constant 0.72ms 14.91ms 16.73ms 30.65ms 36.28ms 170.64ms
Ramping 0.76ms 67.86ms 69.67ms 131.06ms 149.26ms 247.46ms
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) 752.33 0.00%
Ramping (0-500-0 VUs) 832.31 0.00%
Response Times & Query
Min Med Avg P90 P95 Max
Constant 9.10ms 61.97ms 64.95ms 80.24ms 88.61ms 348.06ms
Ramping 1.86ms 257.05ms 258.63ms 508.62ms 547.14ms 671.85ms
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) 23542.40 0.00%
Ramping (0-500-0 VUs) 18598.69 0.00%
Response Times & Query
Min Med Avg P90 P95 Max
Constant 0.09ms 1.70ms 2.07ms 3.95ms 4.82ms 46.40ms
Ramping 0.10ms 9.43ms 11.38ms 23.22ms 28.06ms 121.25ms
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 22345128088 • Commit 844ff5d • Tue, 24 Feb 2026 10:28:36 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