Trait juniper_graphql_ws::Schema
source · [−]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.