pub trait FromGraphQLContext: Sized {
// Required method
async fn from_graphql_context(ctx: &Context<'_>) -> FieldResult<Self>;
}Expand description
Trait for extracting types from GraphQL context.
Implement this on your user/session types to extract them from the GraphQL context.
Required Methods§
Sourceasync fn from_graphql_context(ctx: &Context<'_>) -> FieldResult<Self>
async fn from_graphql_context(ctx: &Context<'_>) -> FieldResult<Self>
Extracts the type from the GraphQL context.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.