@grafctory/keep
    Preparing search index...

    Type Alias Handler<R>

    Handler: (batch: readonly Deferred<R>[], broker: Broker) => Promise<void>

    Batch handler for a single request type.

    Supplied by the connector to createBatchingStore, one per request type. A handler receives requests of its type accumulated since the previous batch, together with a Broker for issuing nested requests. It settles each Deferred in the batch with its result or error. The returned promise must resolve only once every request in the batch has settled, including any nested requests issued through the broker.

    Every batch shares one plan, so a handler reads the plan off any of its requests and never compares them. Every Detail in a batch names the same shape, a structurally equal model and an equal locale. Every Select names the same field, a structurally equal query, an equal locale and the same virtual flag. A detail batch may mix virtual and held requests, so a detail handler reads virtual off each request. Detect and Modify batches are not split by plan, and a modify batch keeps submission order. A batch is never empty and never holds more requests than the limit declared for its type.

    Type Parameters

    • R extends Request

      The request variant handled

    Type Declaration