Trait juniper_graphql_ws::Init[][src]

pub trait Init<S: ScalarValue, CtxT>: Unpin + 'static {
    type Error: Error;
    type Future: Future<Output = Result<ConnectionConfig<CtxT>, Self::Error>> + Send + 'static;
    fn init(self, params: Variables<S>) -> Self::Future;
}
Expand description

Init defines the requirements for types that can provide connection configurations when ConnectionInit messages are received. Implementations are provided for ConnectionConfig and closures that meet the requirements.

Associated Types

The error that is returned on failure. The formatted error will be used as the contents of the “message” field sent back to the client.

The future configuration type.

Required methods

Returns a future for the configuration to use.

Implementors