pub async fn graphql_batch_handler<S: Subject, Query, Mutation, Subscription>(
    __arg0: Extension<Schema<Query, Mutation, Subscription>>,
    __arg1: Extension<Option<S>>,
    __arg2: Extension<RequestId>,
    req: GraphQLBatchRequest
) -> GraphQLResponse
where Query: ObjectType + 'static, Mutation: ObjectType + 'static, Subscription: SubscriptionType + 'static,
Expand description

Handler for batch requests.

Both Option<Subject> and RequestId will be added to the GraphQL context before executing the request on the schema.

This handler expects three extensions:

  • Schema<Query, Mutation, Subscription> with the GraphQL Schema
  • Option<Subject> with the subject (see CheckAuth)
  • RequestId with the request id (see RequestIdLayer)