[−][src]Trait async_graphql::extensions::Extension
Represents a GraphQL extension
Provided methods
fn name(&self) -> Option<&'static str>
[−]
If this extension needs to output data to query results, you need to specify a name.
fn prepare_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
ctx: &'life1 ExtensionContext<'life2>,
request: Request
) -> Pin<Box<dyn Future<Output = ServerResult<Request>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
[−]
&'life0 mut self,
ctx: &'life1 ExtensionContext<'life2>,
request: Request
) -> Pin<Box<dyn Future<Output = ServerResult<Request>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Called at the prepare request
fn parse_start(
&mut self,
ctx: &ExtensionContext<'_>,
query_source: &str,
variables: &Variables
)
[−]
&mut self,
ctx: &ExtensionContext<'_>,
query_source: &str,
variables: &Variables
)
Called at the begin of the parse.
fn parse_end(
&mut self,
ctx: &ExtensionContext<'_>,
document: &ExecutableDocument
)
[−]
&mut self,
ctx: &ExtensionContext<'_>,
document: &ExecutableDocument
)
Called at the end of the parse.
fn validation_start(&mut self, ctx: &ExtensionContext<'_>)
[−]
Called at the begin of the validation.
fn validation_end(&mut self, ctx: &ExtensionContext<'_>)
[−]
Called at the end of the validation.
fn execution_start(&mut self, ctx: &ExtensionContext<'_>)
[−]
Called at the begin of the execution.
fn execution_end(&mut self, ctx: &ExtensionContext<'_>)
[−]
Called at the end of the execution.
fn resolve_start(&mut self, ctx: &ExtensionContext<'_>, info: &ResolveInfo<'_>)
[−]
Called at the begin of the resolve field.
fn resolve_end(&mut self, ctx: &ExtensionContext<'_>, info: &ResolveInfo<'_>)
[−]
Called at the end of the resolve field.
fn error(&mut self, ctx: &ExtensionContext<'_>, err: &ServerError)
[−]
Called when an error occurs.
fn result(&mut self, ctx: &ExtensionContext<'_>) -> Option<Value>
[−]
Get the results