Skip to content

[StrawberryShake] Enable @oneOf#8917

Merged
tobias-tengler merged 1 commit into
mainfrom
tte/enable-oneof-in-strawberry-shake
Nov 18, 2025
Merged

[StrawberryShake] Enable @oneOf#8917
tobias-tengler merged 1 commit into
mainfrom
tte/enable-oneof-in-strawberry-shake

Conversation

@tobias-tengler
Copy link
Copy Markdown
Member

No description provided.

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 enables support for the GraphQL @OneOf directive in StrawberryShake code generation by setting the EnableOneOf flag to true. This allows StrawberryShake to generate client code for schemas that use @OneOf input types.

  • Enables the @OneOf directive in schema parsing
  • Adds test coverage to verify code generation for @OneOf input types

Reviewed Changes

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

File Description
SchemaHelper.cs Changes EnableOneOf from false to true to enable @OneOf directive support
SchemaGeneratorTests.cs Adds two new tests verifying code generation for schemas with @OneOf input types
Schema_With_OneOf.snap Snapshot of expected generated code for a schema using @OneOf
Schema_With_OneOf_And_Directive_Definition.snap Snapshot of expected generated code for a schema with explicit @OneOf directive definition

💡 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
5879.63 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.83ms 7.09ms 158.44ms 8.35ms 13.03ms 18.58ms

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

Requests/sec Error Rate
4621.12 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.77ms 37.57ms 254.73ms 48.12ms 109.15ms 126.28ms

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
68.83 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
20.47ms 672.91ms 1240.96ms 672.71ms 796.71ms 851.78ms

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

Requests/sec Error Rate
68.47 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
15.93ms 2031.06ms 7075.59ms 2234.47ms 4900.71ms 5412.48ms

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
23851.64 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.09ms 1.69ms 43.96ms 2.05ms 3.92ms 4.79ms

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

Requests/sec Error Rate
18915.98 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.09ms 9.14ms 102.45ms 11.16ms 23.15ms 27.96ms

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 19436957840 • Commit 78de78f • Mon, 17 Nov 2025 17:13:34 GMT

@tobias-tengler tobias-tengler merged commit 9c54377 into main Nov 18, 2025
116 of 119 checks passed
@tobias-tengler tobias-tengler deleted the tte/enable-oneof-in-strawberry-shake branch November 18, 2025 08:02
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