Skip to content

Remove EnableOneOf option#9177

Merged
glen-84 merged 1 commit intomainfrom
gai/remove-enable-one-of-option
Feb 23, 2026
Merged

Remove EnableOneOf option#9177
glen-84 merged 1 commit intomainfrom
gai/remove-enable-one-of-option

Conversation

@glen-84
Copy link
Copy Markdown
Member

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

Summary of the changes (Less than 80 chars)

  • Remove EnableOneOf option.

Copilot AI review requested due to automatic review settings February 23, 2026 13:01
@github-actions github-actions Bot added 📚 documentation This issue is about working on our documentation. 🌶️ hot chocolate labels Feb 23, 2026
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 pull request removes the EnableOneOf configuration option from HotChocolate v16, as the @oneOf directive is now a built-in feature that no longer requires opt-in configuration. The changes ensure that OneOf functionality is always available without requiring users to explicitly enable it through schema options.

Changes:

  • Removed EnableOneOf property from IReadOnlySchemaOptions interface and SchemaOptions class
  • Updated introspection type __Type to always include the isOneOf field instead of conditionally
  • Moved OneOfDirectiveType registration from conditional to always-registered alongside other core directives
  • Updated v16 documentation to remove references to the configuration option and added migration guidance

Reviewed changes

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

Show a summary per file
File Description
website/src/docs/hotchocolate/v16/migrating/migrate-from-15-to-16.md Added migration documentation explaining the removal of the EnableOneOf option
website/src/docs/hotchocolate/v16/defining-a-schema/input-object-types.md Removed .ModifyOptions(o => o.EnableOneOf = true) from code example since it's no longer needed
src/HotChocolate/Core/src/Types/IReadOnlySchemaOptions.cs Removed EnableOneOf property from the interface
src/HotChocolate/Core/src/Types/SchemaOptions.cs Removed EnableOneOf property and its initialization from the class
src/HotChocolate/Core/src/Types/Types/Introspection/__Type.cs Made isOneOf field always available instead of conditional on EnableOneOf option
src/HotChocolate/Core/src/Types/Configuration/BuiltInDirectiveTypeReferences.cs Moved OneOfDirectiveType registration from conditional to always-registered with core directives
src/HotChocolate/Core/test/Types.Tests/Configuration/__snapshots__/*.snap Updated test snapshots to reflect new ordering where OneOfDirectiveType is registered after core directives

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

@glen-84 glen-84 merged commit 8d482d6 into main Feb 23, 2026
121 checks passed
@glen-84 glen-84 deleted the gai/remove-enable-one-of-option branch February 23, 2026 13:16
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (924f3dc) to head (6fc7ea0).
⚠️ Report is 1 commits behind head on main.

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

☔ 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) 2930.57 0.00%
Ramping (0-500-0 VUs) 3093.00 0.00%
Response Times & Query
Min Med Avg P90 P95 Max
Constant 0.76ms 15.08ms 16.84ms 30.95ms 36.44ms 172.74ms
Ramping 0.72ms 70.05ms 71.97ms 135.01ms 154.59ms 294.03ms
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.50 0.00%
Ramping (0-500-0 VUs) 830.19 0.00%
Response Times & Query
Min Med Avg P90 P95 Max
Constant 9.06ms 61.56ms 64.93ms 80.99ms 90.17ms 354.77ms
Ramping 1.83ms 255.10ms 257.75ms 503.35ms 535.65ms 642.15ms
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) 23246.69 0.00%
Ramping (0-500-0 VUs) 18299.60 0.00%
Response Times & Query
Min Med Avg P90 P95 Max
Constant 0.10ms 1.74ms 2.10ms 4.00ms 4.89ms 46.75ms
Ramping 0.10ms 9.46ms 11.51ms 23.65ms 28.56ms 106.69ms
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 22307241164 • Commit 302b890 • Mon, 23 Feb 2026 13:19:58 GMT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📚 documentation This issue is about working on our documentation. 🌶️ hot chocolate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants