Skip to content

[Fusion] Add AddHttpResponseFormatter and AddSocketSessionInterceptor#9757

Merged
tobias-tengler merged 3 commits into
mainfrom
tte/add-missing-fusion-interceptor-registration-methods
May 21, 2026
Merged

[Fusion] Add AddHttpResponseFormatter and AddSocketSessionInterceptor#9757
tobias-tengler merged 3 commits into
mainfrom
tte/add-missing-fusion-interceptor-registration-methods

Conversation

@tobias-tengler

Copy link
Copy Markdown
Member

No description provided.

@tobias-tengler tobias-tengler marked this pull request as ready for review May 21, 2026 05:53
Copilot AI review requested due to automatic review settings May 21, 2026 05:53

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 extends the Fusion ASP.NET Core gateway builder API to allow customizing outbound HTTP behavior and WebSocket session handling, and adds tests to validate the new DI extension methods.

Changes:

  • Add AddSocketSessionInterceptor overloads to configure GraphQL-over-WebSocket session interception for Fusion gateways.
  • Add AddHttpResponseFormatter overloads to configure/replace the gateway’s IHttpResponseFormatter (including an indented JSON option).
  • Add new Fusion ASP.NET Core tests (including WebSocket coverage) and required test-project references/utilities.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/HotChocolate/Fusion/src/Fusion.AspNetCore/DependencyInjection/AspNetCoreFusionGatewayBuilderExtensions.HttpRequestInterceptor.cs Adds new gateway builder extension methods for socket session interception and HTTP response formatting.
src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/GatewayBuilderInterceptorTests.cs New tests verifying interceptors and HTTP response formatter registration behavior (HTTP + WebSocket).
src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/FusionTestBase.cs Exposes TestServer.CreateWebSocketClient() via the test Gateway wrapper.
src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/HotChocolate.Fusion.AspNetCore.Tests.csproj Adds project reference needed for WebSocket client test support.

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

@tobias-tengler tobias-tengler merged commit 7f8e6b8 into main May 21, 2026
142 checks passed
@tobias-tengler tobias-tengler deleted the tte/add-missing-fusion-interceptor-registration-methods branch May 21, 2026 06:15
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