pub async fn subscription_handler(
headers: HeaderMap,
ws: WebSocketUpgrade,
__arg2: State<SubscriptionState>,
) -> impl IntoResponseExpand description
WebSocket upgrade handler for subscriptions.
Negotiates the WebSocket sub-protocol from the Sec-WebSocket-Protocol
header. Supports graphql-transport-ws (modern) and graphql-ws (legacy).
Defaults to graphql-transport-ws when no header is present.
Returns 400 Bad Request for unrecognised protocols.