Skip to content

[Fusion] Document the operation kind annotation opt-in for request deduplication - #10083

Merged
michaelstaib merged 5 commits into
mainfrom
mst/dedup-opt
Jul 10, 2026
Merged

michaelstaib merged 5 commits into
mainfrom
mst/dedup-opt

Conversation

@michaelstaib

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings July 10, 2026 11:37
@github-actions github-actions Bot added 📚 documentation This issue is about working on our documentation. 🌶️ hot chocolate labels Jul 10, 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.

Pull request overview

This PR introduces (and documents) an opt-in mechanism for propagating the GraphQL operation kind onto outgoing subgraph HTTP requests so that downstream HTTP pipeline components—specifically request deduplication—can make decisions without parsing the request body.

Changes:

  • Adds FusionRequestOptions.AnnotateOperationKind (default false) and wires it through the Fusion HTTP source schema client so it conditionally sets GraphQLHttpRequest.OperationKind.
  • Updates Fusion performance tuning docs to explain the two required steps for deduplication: enabling operation-kind annotation in the gateway + adding the deduplication handler to the named HTTP client.
  • Updates AddRequestDeduplication() XML docs to reflect the current signaling mechanism (HttpRequestMessage.Options / OperationKindOptionsKey).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
website/content/docs/fusion/performance-tuning.md Documents the required opt-in and configuration steps for request deduplication.
src/HotChocolate/Fusion/src/Fusion.Execution/Execution/FusionRequestOptions.cs Adds AnnotateOperationKind option and includes it in Clone().
src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/HttpSourceSchemaClientFactory.cs Passes the schema request option into the HTTP source schema client.
src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/HttpSourceSchemaClient.cs Conditionally sets GraphQLHttpRequest.OperationKind based on the new opt-in flag.
src/HotChocolate/AspNetCore/src/Transport.Http/RequestDeduplicationHttpClientBuilderExtensions.cs Updates XML docs to match operation-kind signaling via HttpRequestMessage.Options.

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

michaelstaib and others added 4 commits July 10, 2026 13:55
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@michaelstaib
michaelstaib merged commit e0b642b into main Jul 10, 2026
6 of 7 checks passed
@michaelstaib
michaelstaib deleted the mst/dedup-opt branch July 10, 2026 12:02
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