Struct async_graphql::Schema [−][src]
pub struct Schema<Query, Mutation, Subscription>(_);Expand description
GraphQL schema.
Cloning a schema is cheap, so it can be easily shared.
Implementations
impl<Query, Mutation, Subscription> Schema<Query, Mutation, Subscription> where
Query: ObjectType + 'static,
Mutation: ObjectType + 'static,
Subscription: SubscriptionType + 'static,
impl<Query, Mutation, Subscription> Schema<Query, Mutation, Subscription> where
Query: ObjectType + 'static,
Mutation: ObjectType + 'static,
Subscription: SubscriptionType + 'static,
pub fn build(
query: Query,
mutation: Mutation,
subscription: Subscription
) -> SchemaBuilder<Query, Mutation, Subscription>
pub fn build(
query: Query,
mutation: Mutation,
subscription: Subscription
) -> SchemaBuilder<Query, Mutation, Subscription>
Create a schema builder
The root object for the query and Mutation needs to be specified.
If there is no mutation, you can use EmptyMutation.
If there is no subscription, you can use EmptySubscription.
Create a schema
Returns Federation SDL(Schema Definition Language) of this schema.
Get all names in this schema
Maybe you want to serialize a custom binary protocol. In order to minimize message size, a dictionary is usually used to compress type names, field names, directive names, and parameter names. This function gets all the names, so you can create this dictionary.
Execute a GraphQL batch query.
Trait Implementations
impl<Query, Mutation, Subscription> Default for Schema<Query, Mutation, Subscription> where
Query: Default + ObjectType + 'static,
Mutation: Default + ObjectType + 'static,
Subscription: Default + SubscriptionType + 'static,
impl<Query, Mutation, Subscription> Default for Schema<Query, Mutation, Subscription> where
Query: Default + ObjectType + 'static,
Mutation: Default + ObjectType + 'static,
Subscription: Default + SubscriptionType + 'static,
Auto Trait Implementations
impl<Query, Mutation, Subscription> !RefUnwindSafe for Schema<Query, Mutation, Subscription>
impl<Query, Mutation, Subscription> Send for Schema<Query, Mutation, Subscription> where
Mutation: Send + Sync,
Query: Send + Sync,
Subscription: Send + Sync,
impl<Query, Mutation, Subscription> Sync for Schema<Query, Mutation, Subscription> where
Mutation: Send + Sync,
Query: Send + Sync,
Subscription: Send + Sync,
impl<Query, Mutation, Subscription> !UnwindSafe for Schema<Query, Mutation, Subscription>
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more