You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WebsocketConnection does not send subprotocols during accept
Client sent graphql-ws subprotocol during websocket handshake, Sanic replied with an empty string instead of populating data extracted from scope
You are running ASGI server? Websockets in ASGI mode do still need some work. I believe when I added ASGI support, they were not yet supported in the ASGI spec. It looks like they are there now, so it should be a relatively small PR if you would like to give it a shot.
Without looking too deeply at this right now, I believe you need to grab scope['subprotocols'] in here:
WebsocketConnection does not send subprotocols during accept
Client sent graphql-ws subprotocol during websocket handshake, Sanic replied with an empty string instead of populating data extracted from scope
Code snippet
In the accept function, the subprotocol field is hardcoded as an empty string
Expected behavior
Allow the subprotocol field to be populated from an ASGI client or external scope
Environment (please complete the following information):
Additional context
Sanic is a simple and elegant framework, I would love to help out with a PR but will need some direction. :)
The text was updated successfully, but these errors were encountered: