1.1.15 • Published 4 years ago

apollo-link-batch v1.1.15

Weekly downloads
172,754
License
MIT
Repository
github
Last release
4 years ago

Batch Link

Purpose

An Apollo Link to allow batching of multiple operations into a single request. For example, the apollo-link-batch-http uses this link to batch operations into a single http request.

Installation

npm install apollo-link-batch --save

Usage

import { BatchLink } from "apollo-link-batch";

const link = new BatchLink({
  batchHandler: (operations: Operation[], forward: NextLink) => Observable<FetchResult[]> | null
});

Options

Batch Link takes an object with three options on it to customize the behavior of the link. The only required option is the batchHandler function

namevaluedefaultrequired
batchIntervalnumber10false
batchMaxnumber0false
batchHandler(operations: Operation[], forward: NextLink) => Observable<FetchResult[]>nullNAtrue

Context

The Batch Link does not use the context for anything

1.1.15

4 years ago

2.0.0-beta.0

4 years ago

1.1.14

5 years ago

1.1.13

5 years ago

1.1.12

5 years ago

1.1.11

5 years ago

1.1.10

5 years ago

1.1.9

5 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

7 years ago

0.4.0

7 years ago

0.3.0

7 years ago

0.2.1-beta.6

7 years ago

0.2.1-beta.5

7 years ago

0.2.1-beta.3

7 years ago

0.2.1-beta.4

7 years ago

0.2.1-beta.1

7 years ago

0.2.1-beta.0

7 years ago

0.1.4

7 years ago

0.1.2

7 years ago

0.1.0

7 years ago

0.0.0

7 years ago