Closed
Description
I have
async fn subscriptions(
req: HttpRequest,
stream: web::Payload,
schema: web::Data<Schema>,
) -> Result<HttpResponse, Error> {
let context = Context::new()
let schema = schema.into_inner();
let config = ConnectionConfig::new(context);
let config = config.with_keep_alive_interval(Duration::from_secs(15));
subscriptions_handler(req, stream, schema, config).await
}
but subscriptions_handler(req, stream, schema, config).await
the config
argument gives error
expected a `FnOnce<(HashMap<std::string::String, InputValue>,)>` closure, found `ConnectionConfig<context::Context>`
the trait `FnOnce<(HashMap<std::string::String, InputValue>,)>` is not implemented for `ConnectionConfig<context::Context>`
the trait `juniper_graphql_ws::Init<S, CtxT>` is implemented for `juniper_graphql_ws::ConnectionConfig<CtxT>`
required for `ConnectionConfig<context::Context>` to implement `juniper_graphql_ws::Init<DefaultScalarValue, context::Context>`