Trait async_graphql::extensions::Extension [−][src]
pub trait Extension: Sync + Send + 'static { #[must_use] fn request<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 ExtensionContext<'life2>,
next: NextRequest<'life3>
) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait, { ... } fn subscribe<'s>(
&self,
ctx: &ExtensionContext<'_>,
stream: BoxStream<'s, Response>,
next: NextSubscribe<'_>
) -> BoxStream<'s, Response> { ... } #[must_use] fn prepare_request<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 ExtensionContext<'life2>,
request: Request,
next: NextPrepareRequest<'life3>
) -> Pin<Box<dyn Future<Output = ServerResult<Request>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait, { ... } #[must_use] fn parse_query<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
ctx: &'life1 ExtensionContext<'life2>,
query: &'life3 str,
variables: &'life4 Variables,
next: NextParseQuery<'life5>
) -> Pin<Box<dyn Future<Output = ServerResult<ExecutableDocument>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
Self: 'async_trait, { ... } #[must_use] fn validation<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 ExtensionContext<'life2>,
next: NextValidation<'life3>
) -> Pin<Box<dyn Future<Output = Result<ValidationResult, Vec<ServerError>>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait, { ... } #[must_use] fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 ExtensionContext<'life2>,
next: NextExecute<'life3>
) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait, { ... } #[must_use] fn resolve<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
ctx: &'life1 ExtensionContext<'life2>,
info: ResolveInfo<'life3>,
next: NextResolve<'life4>
) -> Pin<Box<dyn Future<Output = ServerResult<Option<Value>>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait, { ... } }
Expand description
Represents a GraphQL extension
Provided methods
#[must_use]fn request<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 ExtensionContext<'life2>,
next: NextRequest<'life3>
) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]fn request<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 ExtensionContext<'life2>,
next: NextRequest<'life3>
) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
[src]Called at start query/mutation request.
fn subscribe<'s>(
&self,
ctx: &ExtensionContext<'_>,
stream: BoxStream<'s, Response>,
next: NextSubscribe<'_>
) -> BoxStream<'s, Response>
[src]
fn subscribe<'s>(
&self,
ctx: &ExtensionContext<'_>,
stream: BoxStream<'s, Response>,
next: NextSubscribe<'_>
) -> BoxStream<'s, Response>
[src]Called at subscribe request.
#[must_use]fn prepare_request<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 ExtensionContext<'life2>,
request: Request,
next: NextPrepareRequest<'life3>
) -> Pin<Box<dyn Future<Output = ServerResult<Request>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]fn prepare_request<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 ExtensionContext<'life2>,
request: Request,
next: NextPrepareRequest<'life3>
) -> Pin<Box<dyn Future<Output = ServerResult<Request>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
[src]Called at prepare request.
#[must_use]fn parse_query<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
ctx: &'life1 ExtensionContext<'life2>,
query: &'life3 str,
variables: &'life4 Variables,
next: NextParseQuery<'life5>
) -> Pin<Box<dyn Future<Output = ServerResult<ExecutableDocument>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]fn parse_query<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
ctx: &'life1 ExtensionContext<'life2>,
query: &'life3 str,
variables: &'life4 Variables,
next: NextParseQuery<'life5>
) -> Pin<Box<dyn Future<Output = ServerResult<ExecutableDocument>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
Self: 'async_trait,
[src]Called at parse query.
#[must_use]fn validation<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 ExtensionContext<'life2>,
next: NextValidation<'life3>
) -> Pin<Box<dyn Future<Output = Result<ValidationResult, Vec<ServerError>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]fn validation<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 ExtensionContext<'life2>,
next: NextValidation<'life3>
) -> Pin<Box<dyn Future<Output = Result<ValidationResult, Vec<ServerError>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
[src]Called at validation query.
#[must_use]fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 ExtensionContext<'life2>,
next: NextExecute<'life3>
) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 ExtensionContext<'life2>,
next: NextExecute<'life3>
) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
[src]Called at execute query.
#[must_use]fn resolve<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
ctx: &'life1 ExtensionContext<'life2>,
info: ResolveInfo<'life3>,
next: NextResolve<'life4>
) -> Pin<Box<dyn Future<Output = ServerResult<Option<Value>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]fn resolve<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
ctx: &'life1 ExtensionContext<'life2>,
info: ResolveInfo<'life3>,
next: NextResolve<'life4>
) -> Pin<Box<dyn Future<Output = ServerResult<Option<Value>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
[src]Called at resolve field.