Libraries
    Preparing search index...

    Interface ServerBatchingOptions

    Configuration for the server-side request batching endpoint, enabled via ServerBuilder.useBatching().

    The batch endpoint accepts POST <path> with a JSON body containing an array of sub-requests. It processes each through the full middleware and handler pipeline, then returns an array of sub-responses in a single reply.

    new ServerBuilder()
    .useBatching({ path: '/__batch', maxSize: 20, parallel: true })
    .handleAll(mapping)
    .listen(3000);
    interface ServerBatchingOptions {
        maxSize?: number;
        parallel?: boolean;
        path?: string;
    }
    Index

    Properties

    maxSize?: number

    Maximum number of sub-requests allowed per batch.

    Requests exceeding this limit are rejected with 400 Bad Request.

    20
    
    parallel?: boolean

    Whether to execute sub-requests in parallel (true) or sequentially (false).

    Parallel execution is faster but requires all handlers to be concurrency-safe. Set to false if your handlers share mutable request-scoped state that would cause conflicts when run concurrently.

    true
    
    path?: string

    URL path of the batch endpoint.

    Must match the batchPath configured on the client-side batching() middleware.

    '/__batch'