0.2.1 • Published 6 years ago

apollo-link-combine-includes v0.2.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

Combine Includes Link

Build Status coverage npm version sponsored by Taller

⚠️ Be careful

This project is a crazy experiment, did work with a quite complicated scenario, but is honestly not yet stressed enough to consider it not error prone, or even stable.

Purpose

An Apollo Link that combines multiple same-query requests using different include/skip directives into a single query.

Installation

npm install apollo-link-combine-includes --save

Usage

import { CombineIncludesLink } from 'apollo-link-combine-includes'

const link = new CombineIncludesLink()

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
canCombine(operation: Operation, defaultCanCombine: function) => BooleanOperation has a name and include directivesfalse

Context

The CombineIncludesLink does not use the context for anything

0.2.1

6 years ago

0.1.0

6 years ago