pub async fn graphql_transport_ws_handler<Query, Mutation, Subscription, CtxT, S, I>(
    req: HttpRequest,
    stream: Payload,
    schema: Arc<RootNode<'static, Query, Mutation, Subscription, S>>,
    init: I
) -> Result<HttpResponse, Error>
where Query: GraphQLTypeAsync<S, Context = CtxT> + Send + 'static, Query::TypeInfo: Send + Sync, Mutation: GraphQLTypeAsync<S, Context = CtxT> + Send + 'static, Mutation::TypeInfo: Send + Sync, Subscription: GraphQLSubscriptionType<S, Context = CtxT> + Send + 'static, Subscription::TypeInfo: Send + Sync, CtxT: Unpin + Send + Sync + 'static, S: ScalarValue + Send + Sync + 'static, I: Init<S, CtxT> + Send,
Expand description

Serves the new graphql-transport-ws GraphQL over WebSocket Protocol.

The init argument is used to provide the context and additional configuration for connections. This can be a juniper_graphql_ws::ConnectionConfig if the context and configuration are already known, or it can be a closure that gets executed asynchronously when the client sends the ConnectionInit message. Using a closure allows to perform an authentication based on the parameters provided by a client.