Struct juniper_subscriptions::Coordinator
source · [−]pub struct Coordinator<'a, QueryT, MutationT, SubscriptionT, CtxT, S> where
QueryT: GraphQLTypeAsync<S, Context = CtxT> + Send,
QueryT::TypeInfo: Send + Sync,
MutationT: GraphQLTypeAsync<S, Context = CtxT> + Send,
MutationT::TypeInfo: Send + Sync,
SubscriptionT: GraphQLSubscriptionType<S, Context = CtxT> + Send,
SubscriptionT::TypeInfo: Send + Sync,
CtxT: Sync,
S: ScalarValue + Send + Sync, { /* private fields */ }
Expand description
Simple SubscriptionCoordinator
implementation:
- contains the schema
- handles subscription start
Implementations
impl<'a, QueryT, MutationT, SubscriptionT, CtxT, S> Coordinator<'a, QueryT, MutationT, SubscriptionT, CtxT, S> where
QueryT: GraphQLTypeAsync<S, Context = CtxT> + Send,
QueryT::TypeInfo: Send + Sync,
MutationT: GraphQLTypeAsync<S, Context = CtxT> + Send,
MutationT::TypeInfo: Send + Sync,
SubscriptionT: GraphQLSubscriptionType<S, Context = CtxT> + Send,
SubscriptionT::TypeInfo: Send + Sync,
CtxT: Sync,
S: ScalarValue + Send + Sync,
impl<'a, QueryT, MutationT, SubscriptionT, CtxT, S> Coordinator<'a, QueryT, MutationT, SubscriptionT, CtxT, S> where
QueryT: GraphQLTypeAsync<S, Context = CtxT> + Send,
QueryT::TypeInfo: Send + Sync,
MutationT: GraphQLTypeAsync<S, Context = CtxT> + Send,
MutationT::TypeInfo: Send + Sync,
SubscriptionT: GraphQLSubscriptionType<S, Context = CtxT> + Send,
SubscriptionT::TypeInfo: Send + Sync,
CtxT: Sync,
S: ScalarValue + Send + Sync,
Builds new Coordinator
with specified root_node
Trait Implementations
impl<'a, QueryT, MutationT, SubscriptionT, CtxT, S> SubscriptionCoordinator<'a, CtxT, S> for Coordinator<'a, QueryT, MutationT, SubscriptionT, CtxT, S> where
QueryT: GraphQLTypeAsync<S, Context = CtxT> + Send,
QueryT::TypeInfo: Send + Sync,
MutationT: GraphQLTypeAsync<S, Context = CtxT> + Send,
MutationT::TypeInfo: Send + Sync,
SubscriptionT: GraphQLSubscriptionType<S, Context = CtxT> + Send,
SubscriptionT::TypeInfo: Send + Sync,
CtxT: Sync,
S: ScalarValue + Send + Sync + 'a,
impl<'a, QueryT, MutationT, SubscriptionT, CtxT, S> SubscriptionCoordinator<'a, CtxT, S> for Coordinator<'a, QueryT, MutationT, SubscriptionT, CtxT, S> where
QueryT: GraphQLTypeAsync<S, Context = CtxT> + Send,
QueryT::TypeInfo: Send + Sync,
MutationT: GraphQLTypeAsync<S, Context = CtxT> + Send,
MutationT::TypeInfo: Send + Sync,
SubscriptionT: GraphQLSubscriptionType<S, Context = CtxT> + Send,
SubscriptionT::TypeInfo: Send + Sync,
CtxT: Sync,
S: ScalarValue + Send + Sync + 'a,
type Connection = Connection<'a, S>
type Connection = Connection<'a, S>
Type of SubscriptionConnection
s this SubscriptionCoordinator
returns Read more
type Error = GraphQLError<'a>
type Error = GraphQLError<'a>
Type of error while trying to spawn SubscriptionConnection
fn subscribe(
&'a self,
req: &'a GraphQLRequest<S>,
context: &'a CtxT
) -> BoxFuture<'a, Result<Self::Connection, Self::Error>>
fn subscribe(
&'a self,
req: &'a GraphQLRequest<S>,
context: &'a CtxT
) -> BoxFuture<'a, Result<Self::Connection, Self::Error>>
Return SubscriptionConnection
based on given GraphQLRequest