ChilliCream/graphql-platform

Websocket per message deflate

baytekink opened this issue · 0 comments

Product

Hot Chocolate

Is your feature request related to a problem?

Hi everyone, is there any way to compress messages when using websockets on Hotchocolate defining like here: https://www.rfc-editor.org/rfc/rfc7692 ? smth: per message deflate

The solution you'd like

As far as I saw from codes, HotChocolate.AspNetCore.Subscriptions.WebSocketConnection.cs creates the websocket connection on TryAcceptConnection method. using var socket = await webSocketManager.AcceptWebSocketAsync(); with this code. Can we have a chance to give WebSocketAcceptContext while AcceptWebSocketAsync which I send you attached picture. DangerousEnableCompression will do the permessagedeflate operation if given true, thx in advance