[][src]Trait async_graphql::extensions::Extension

pub trait Extension: Sync + Send + 'static {
    fn name(&self) -> Option<&'static str> { ... }
fn parse_start(&mut self, query_source: &str, variables: &Variables) { ... }
fn parse_end(&mut self, document: &Document) { ... }
fn validation_start(&mut self) { ... }
fn validation_end(&mut self) { ... }
fn execution_start(&mut self) { ... }
fn execution_end(&mut self) { ... }
fn resolve_start(&mut self, info: &ResolveInfo) { ... }
fn resolve_end(&mut self, info: &ResolveInfo) { ... }
fn error(&mut self, err: &Error) { ... }
fn result(&mut self) -> Option<Value> { ... } }

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 parse_start(&mut self, query_source: &str, variables: &Variables)

Called at the begin of the parse.

fn parse_end(&mut self, document: &Document)

Called at the end of the parse.

fn validation_start(&mut self)

Called at the begin of the validation.

fn validation_end(&mut self)

Called at the end of the validation.

fn execution_start(&mut self)

Called at the begin of the execution.

fn execution_end(&mut self)

Called at the end of the execution.

fn resolve_start(&mut self, info: &ResolveInfo)

Called at the begin of the resolve field.

fn resolve_end(&mut self, info: &ResolveInfo)

Called at the end of the resolve field.

fn error(&mut self, err: &Error)

Called when an error occurs.

fn result(&mut self) -> Option<Value>

Get the results

Loading content...

Implementors

impl Extension for ApolloTracing[src]

impl Extension for Logger[src]

impl Extension for Tracing[src]

Loading content...