Trait juniper_graphql_ws::Schema [−][src]
pub trait Schema: Unpin + Clone + Send + Sync + 'static { type Context: Unpin + Send + Sync; type ScalarValue: ScalarValue + Send + Sync; type QueryTypeInfo: Send + Sync; type Query: GraphQLTypeAsync<Self::ScalarValue, Context = Self::Context, TypeInfo = Self::QueryTypeInfo> + Send; type MutationTypeInfo: Send + Sync; type Mutation: GraphQLTypeAsync<Self::ScalarValue, Context = Self::Context, TypeInfo = Self::MutationTypeInfo> + Send; type SubscriptionTypeInfo: Send + Sync; type Subscription: GraphQLSubscriptionType<Self::ScalarValue, Context = Self::Context, TypeInfo = Self::SubscriptionTypeInfo> + Send; fn root_node(
&self
) -> &RootNode<'static, Self::Query, Self::Mutation, Self::Subscription, Self::ScalarValue>; }
Expand description
Schema defines the requirements for schemas that can be used for operations. Typically this is
just an Arc<RootNode<...>>
and you should not have to implement it yourself.
Associated Types
type ScalarValue: ScalarValue + Send + Sync
type ScalarValue: ScalarValue + Send + Sync
The scalar value type.
type QueryTypeInfo: Send + Sync
type QueryTypeInfo: Send + Sync
The query type info.
type Query: GraphQLTypeAsync<Self::ScalarValue, Context = Self::Context, TypeInfo = Self::QueryTypeInfo> + Send
type Query: GraphQLTypeAsync<Self::ScalarValue, Context = Self::Context, TypeInfo = Self::QueryTypeInfo> + Send
The query type.
type MutationTypeInfo: Send + Sync
type MutationTypeInfo: Send + Sync
The mutation type info.
type Mutation: GraphQLTypeAsync<Self::ScalarValue, Context = Self::Context, TypeInfo = Self::MutationTypeInfo> + Send
type Mutation: GraphQLTypeAsync<Self::ScalarValue, Context = Self::Context, TypeInfo = Self::MutationTypeInfo> + Send
The mutation type.
type SubscriptionTypeInfo: Send + Sync
type SubscriptionTypeInfo: Send + Sync
The subscription type info.
type Subscription: GraphQLSubscriptionType<Self::ScalarValue, Context = Self::Context, TypeInfo = Self::SubscriptionTypeInfo> + Send
type Subscription: GraphQLSubscriptionType<Self::ScalarValue, Context = Self::Context, TypeInfo = Self::SubscriptionTypeInfo> + Send
The subscription type.
Required methods
fn root_node(
&self
) -> &RootNode<'static, Self::Query, Self::Mutation, Self::Subscription, Self::ScalarValue>
fn root_node(
&self
) -> &RootNode<'static, Self::Query, Self::Mutation, Self::Subscription, Self::ScalarValue>
Returns the root node for the schema.
Implementations on Foreign Types
impl<QueryT, MutationT, SubscriptionT, CtxT, S> Schema for Arc<RootNode<'static, QueryT, MutationT, SubscriptionT, S>> where
QueryT: GraphQLTypeAsync<S, Context = CtxT> + Send + 'static,
QueryT::TypeInfo: Send + Sync,
MutationT: GraphQLTypeAsync<S, Context = CtxT> + Send + 'static,
MutationT::TypeInfo: Send + Sync,
SubscriptionT: GraphQLSubscriptionType<S, Context = CtxT> + Send + 'static,
SubscriptionT::TypeInfo: Send + Sync,
CtxT: Unpin + Send + Sync,
S: ScalarValue + Send + Sync + 'static,
impl<QueryT, MutationT, SubscriptionT, CtxT, S> Schema for Arc<RootNode<'static, QueryT, MutationT, SubscriptionT, S>> where
QueryT: GraphQLTypeAsync<S, Context = CtxT> + Send + 'static,
QueryT::TypeInfo: Send + Sync,
MutationT: GraphQLTypeAsync<S, Context = CtxT> + Send + 'static,
MutationT::TypeInfo: Send + Sync,
SubscriptionT: GraphQLSubscriptionType<S, Context = CtxT> + Send + 'static,
SubscriptionT::TypeInfo: Send + Sync,
CtxT: Unpin + Send + Sync,
S: ScalarValue + Send + Sync + 'static,
type Context = CtxT
type ScalarValue = S
type QueryTypeInfo = QueryT::TypeInfo
type Query = QueryT
type MutationTypeInfo = MutationT::TypeInfo
type Mutation = MutationT
type SubscriptionTypeInfo = SubscriptionT::TypeInfo
type Subscription = SubscriptionT