# createBatchingTransport (@salmonui/data/json)

> The createBatchingTransport function of @salmonui/data/json: Multiplexes every request issued in the same tick into one { v: 1, batch: [...] } call (lazy group children, facets, prefetch). A consumer that aborts is rejected immediately; the shared call is aborted only when every consumer in it has aborted.

Canonical: https://salmonui.dev/docs/reference/data/json/createBatchingTransport

```ts
import { createBatchingTransport } from '@salmonui/data/json';
```

Also exported from `@salmonui/data`.

Entry index: https://salmonui.dev/docs/reference/data/json (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/data/json.md).

## Reference

Kind: function

```ts
function createBatchingTransport(send: (batch: WireBatchRequest, ctx: TransportContext) => Promise<WireBatchResponse>, options?: {
    readonly maxBatch?: number;
}): UniversalJsonTransport;
```

Multiplexes every request issued in the same tick into one
`{ v: 1, batch: [...] }` call (lazy group children, facets, prefetch).
A consumer that aborts is rejected immediately; the shared call is aborted
only when every consumer in it has aborted.
