Conversation
There was a problem hiding this comment.
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
EnableOneOfproperty fromIReadOnlySchemaOptionsinterface andSchemaOptionsclass - Updated introspection type
__Typeto always include theisOneOffield instead of conditionally - Moved
OneOfDirectiveTyperegistration 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.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9177 +/- ##
============================
============================
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Fusion Gateway Performance ResultsSimple Composite Query
Response Times & Query
query TestQuery {
topProducts(first: 5) {
inStock
name
price
shippingEstimate
upc
weight
reviews {
id
body
author {
id
username
name
}
}
}
}Deep Recursion Query
Response Times & Query
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
Response Times & Query
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 |
Summary of the changes (Less than 80 chars)
EnableOneOfoption.