Skip to main content

graphql_handler

Function graphql_handler 

Source
pub async fn graphql_handler(
    req: HttpRequest,
    schema: Data<GraphQLSchema>,
    state: Data<Arc<AppState>>,
    request: GraphQLRequest,
) -> GraphQLResponse
Expand description

POST /graphql handler. Expects schema and state in app_data; injects GqlContext (with auth user and DataLoader) into the request.