apollo-link-combine-includes

0.2.1 • Public • Published

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

name value default required
batchInterval number 10 false
batchMax number 0 false
canCombine (operation: Operation, defaultCanCombine: function) => Boolean Operation has a name and include directives false

Context

The CombineIncludesLink does not use the context for anything

/apollo-link-combine-includes/

    Package Sidebar

    Install

    npm i apollo-link-combine-includes

    Weekly Downloads

    1

    Version

    0.2.1

    License

    MIT

    Unpacked Size

    93.1 kB

    Total Files

    24

    Last publish

    Collaborators

    • lucasconstantino