juniper_warp

Function make_graphql_filter_sync

Source
pub fn make_graphql_filter_sync<S, Query, Mutation, Subscription, CtxT, CtxErr>(
    schema: impl Into<Arc<RootNode<'static, Query, Mutation, Subscription, S>>>,
    context_extractor: impl Filter<Extract = (CtxT,), Error = CtxErr> + Send + Sync + 'static,
) -> impl Filter<Extract = (Response,), Error = Rejection> + Clone + Send
where Query: GraphQLType<S, Context = CtxT> + Send + Sync + 'static, Query::TypeInfo: Send + Sync, Mutation: GraphQLType<S, Context = CtxT> + Send + Sync + 'static, Mutation::TypeInfo: Send + Sync, Subscription: GraphQLType<S, Context = CtxT> + Send + Sync + 'static, Subscription::TypeInfo: Send + Sync, CtxT: Send + Sync + 'static, CtxErr: Into<Rejection>, S: ScalarValue + Send + Sync + 'static,
Expand description

Same as make_graphql_filter(), but for executing synchronously.

NOTE: In order to avoid blocking, this handler will use tokio::task::spawn_blocking() on the runtime warp is running on.