Struct async_graphql::dynamic::Schema
source · pub struct Schema(_);
Available on crate feature
dynamic-schema
only.Expand description
Dyanmic GraphQL schema.
Cloning a schema is cheap, so it can be easily shared.
Implementations§
source§impl Schema
impl Schema
sourcepub fn build(
query: &str,
mutation: Option<&str>,
subscription: Option<&str>
) -> SchemaBuilder
pub fn build(
query: &str,
mutation: Option<&str>,
subscription: Option<&str>
) -> SchemaBuilder
Create a schema builder
sourcepub fn sdl_with_options(&self, options: SDLExportOptions) -> String
pub fn sdl_with_options(&self, options: SDLExportOptions) -> String
Returns SDL(Schema Definition Language) of this schema with options.
Trait Implementations§
source§impl Executor for Schema
impl Executor for Schema
source§fn execute<'life0, 'async_trait>(
&'life0 self,
request: Request
) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
request: Request
) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Execute a GraphQL query.
source§fn execute_stream(
&self,
request: Request,
session_data: Option<Arc<Data>>
) -> BoxStream<'static, Response>
fn execute_stream(
&self,
request: Request,
session_data: Option<Arc<Data>>
) -> BoxStream<'static, Response>
Execute a GraphQL subscription with session data.
source§fn execute_batch<'life0, 'async_trait>(
&'life0 self,
batch_request: BatchRequest
) -> Pin<Box<dyn Future<Output = BatchResponse> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn execute_batch<'life0, 'async_trait>(
&'life0 self,
batch_request: BatchRequest
) -> Pin<Box<dyn Future<Output = BatchResponse> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Execute a GraphQL batch query.