JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 381812
  • Score
    100M100P100Q174521F
  • License MIT

Error Apollo Link for GraphQL Network Stack

Package Exports

  • apollo-link-error

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (apollo-link-error) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Error Link

Purpose

An Apollo Link to allow sending error events to custom services or loggers.

Installation

npm install apollo-link-error --save

Usage

import { onError } from "apollo-link-error";

const link = onError(({ graphqlErrors, networkError }) => {
  console.error({ graphqlErrors, networkError });
})

Options

Error Link takes a function that is called in the event of an error.

Context

The Error Link does not use the context for anything