Skip to content

Enable variable batching by default - #10405

Merged
michaelstaib merged 2 commits into
mainfrom
mst/batching-defaults
Sep 18, 2026
Merged

michaelstaib merged 2 commits into
mainfrom
mst/batching-defaults

Conversation

@michaelstaib

Copy link
Copy Markdown
Member

No description provided.

Copilot AI lite review requested due to automatic review settings September 18, 2026 10:35
@github-actions github-actions Bot added 📚 documentation This issue is about working on our documentation. 🌶️ hot chocolate labels Sep 18, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Resolve conflicting documented defaults and align the new test name with repository conventions.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Enables variable batching by default while keeping request batching opt-in.

Changes:

  • Updates server defaults and transport capability tests.
  • Revises batching and migration documentation.
  • Adds Fusion coverage for default variable batching.
File summaries
File Summary
website/content/docs/hotchocolate/server/index.md Updates batching overview.
website/content/docs/hotchocolate/server/batching.md Documents new defaults.
website/content/docs/hotchocolate/migrating/migrate-from-15-to-16.md Updates migration guidance.
website/content/docs/fusion/migration/migrate-from-15-to-16.md Updates Fusion migration guidance.
src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/VariableBatchingTests.cs Tests default variable batching.
src/HotChocolate/AspNetCore/test/AspNetCore.Tests/TransportCapabilitiesProviderTests.cs Tests batching capability defaults.
src/HotChocolate/AspNetCore/src/AspNetCore.Pipeline/Options/GraphQLServerOptions.cs Enables variable batching by default.
Review details

Suppressed comments (1)

src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/VariableBatchingTests.cs:12

  • The new test name does not follow the repository's Method_Should_Outcome_When_Condition naming convention and is harder to parse because ProduceAResultPerVariableSet runs the words together. Use underscore-separated words consistently with the surrounding tests.
    public async Task Execute_Should_ProduceAResultPerVariableSet_When_ServerOptionsAreDefault()
  • Files reviewed: 7/7 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

# Enabling Batching

Batching is disabled by default as a security measure. You enable the types of batching you want to allow through the `AllowedBatching` flags enum using `ModifyServerOptions`:
Variable batching is enabled by default. Request batching is disabled by default. You configure the allowed types through the `AllowedBatching` flags enum using `ModifyServerOptions`. To disable all batching:
@github-actions

Copy link
Copy Markdown
Contributor

Patch coverage

100.0% of changed lines covered (1/1)

File Covered Changed Patch %
…/src/AspNetCore.Pipeline/Options/GraphQLServerOptions.cs 1 1 100.0% 🟢

Project coverage: 58.0% (288973/498393 lines)

@michaelstaib
michaelstaib merged commit 5c3241f into main Sep 18, 2026
293 of 295 checks passed
@michaelstaib
michaelstaib deleted the mst/batching-defaults branch September 18, 2026 12:07
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