Struct sudograph::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
Subscription: SubscriptionType + 'static,
Query: ObjectType + 'static,
Mutation: ObjectType + 'static,
impl<Query, Mutation, Subscription> Schema<Query, Mutation, Subscription> where
Subscription: SubscriptionType + 'static,
Query: ObjectType + 'static,
Mutation: ObjectType + '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 query.
Execute a GraphQL batch query.
Trait Implementations
impl<Query, Mutation, Subscription> Default for Schema<Query, Mutation, Subscription> where
Subscription: Default + SubscriptionType + 'static,
Query: Default + ObjectType + 'static,
Mutation: Default + ObjectType + 'static,
impl<Query, Mutation, Subscription> Default for Schema<Query, Mutation, Subscription> where
Subscription: Default + SubscriptionType + 'static,
Query: Default + ObjectType + 'static,
Mutation: Default + ObjectType + '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
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V