Skip to main content

graphql_handler

Function graphql_handler 

Source
pub async fn graphql_handler<A, Q, M, S>(
    schema: Extension<Schema<Q, M, S>>,
    headers: HeaderMap,
    req: GraphQLRequest,
) -> GraphQLResponse
where A: Send + Sync + 'static, Q: ObjectType + Send + Sync + 'static, M: ObjectType + ContainerType + Send + Sync + 'static, S: SubscriptionType + Send + Sync + 'static,
Expand description

GraphQL request handler for Axum.

Extracts the Authorization header and injects it into the GraphQL request context. The schema extension type A is used for authentication.