apollo-link-batch
Apollo Link that performs batching and operation on batched Operations
Last updated 6 years ago by apollo-bot .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install apollo-link-batch 
SYNC missed versions from official npm registry.

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

name value default required
batchInterval number 10 false
batchMax number 0 false
batchHandler (operations: Operation[], forward: NextLink) => Observable<FetchResult[]> null NA

Context

The Batch Link does not use the context for anything

Current Tags

  • 2.0.0-beta.0                                ...           beta (6 years ago)
  • 1.1.15                                ...           latest (6 years ago)

35 Versions

  • 1.1.15                                ...           6 years ago
  • 2.0.0-beta.0                                ...           6 years ago
  • 1.1.14                                ...           7 years ago
  • 1.1.13                                ...           7 years ago
  • 1.1.12                                ...           7 years ago
  • 1.1.11                                ...           7 years ago
  • 1.1.10                                ...           7 years ago
  • 1.1.9                                ...           7 years ago
  • 1.1.8                                ...           7 years ago
  • 1.1.7                                ...           7 years ago
  • 1.1.6                                ...           7 years ago
  • 1.1.5                                ...           7 years ago
  • 1.1.4                                ...           8 years ago
  • 1.1.3                                ...           8 years ago
  • 1.1.2                                ...           8 years ago
  • 1.1.1                                ...           8 years ago
  • 1.1.0                                ...           8 years ago
  • 1.0.5                                ...           8 years ago
  • 1.0.4                                ...           8 years ago
  • 1.0.3                                ...           8 years ago
  • 1.0.2                                ...           8 years ago
  • 1.0.1                                ...           8 years ago
  • 1.0.0                                ...           8 years ago
  • 0.4.0                                ...           8 years ago
  • 0.3.0                                ...           9 years ago
  • 0.2.1-beta.6                                ...           9 years ago
  • 0.2.1-beta.5                                ...           9 years ago
  • 0.2.1-beta.3                                ...           9 years ago
  • 0.2.1-beta.4                                ...           9 years ago
  • 0.2.1-beta.1                                ...           9 years ago
  • 0.2.1-beta.0                                ...           9 years ago
  • 0.1.4                                ...           9 years ago
  • 0.1.2                                ...           9 years ago
  • 0.1.0                                ...           9 years ago
  • 0.0.0                                ...           9 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 2
Last Month 13
Dependencies (2)
Dev Dependencies (12)

Copyright 2013 - present © cnpmjs.org | Home |