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
sourceimpl 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
sourceimpl Executor for Schema
impl Executor for Schema
sourcefn 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.
sourcefn 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.
sourcefn 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.
Auto Trait Implementations
impl !RefUnwindSafe for Schema
impl Send for Schema
impl Sync for Schema
impl Unpin for Schema
impl !UnwindSafe for Schema
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more