Learn how to use GraphQL query batching in the router.
batch
or a batch
, we mean the entire batch request. An operation
or batch operation
refers to a single record in the batch array that will be processed independently.enabled
: As we do not recommend using batching, it is disabled by default.max_concurrency
: Specifies how many operations will be processed concurrently. If you want to disable concurrency and process everything serially, you can set the max_concurrency
value to 1
. The minimum allowed value is 1.max_entries_per_batch
: Defines the maximum number of operations that can be present in a batch. While we do not support unlimited entries, you can set an extremely high number. The minimum allowed value is 1.omit_extensions
: Certain errorCodes
specific to batch operation failures can be omitted.wg.operation.batching.is_batched
: Identifies whether the request is batchedwg.operation.batching.operations_count
: Indicates how many operations are expected in the batch requestwg.operation.batching.operation_index
: Indicates which index of the batch operation array this operation belongs tomax_concurrency
setting, this could result in slower responses compared to sending 200 separate load-balanced requests from the client. We recommend using HTTP/2 multiplexing instead, as described in the next section.
max_entries_per_batch
value, it is much easier for an attacker to DDoS the router plus the services and infrastructure behind the router by sending multiple batch requests containing many operations. This requires much less effort than sending every single batch operation as an individual request.