Skip to content

A collection of apollo links used to help debug GraphQL requests and responses.

Notifications You must be signed in to change notification settings

bashaus/apollo-link-debug

Repository files navigation

@apollo-link-debug/*

codecov

A collection of apollo links used to help debug GraphQL requests and responses.

See the individual packages for more information:

Installation

Install the individual package(s) that you would like to use and connect them to your apollo client.

npm i \
  @apollo-link-debug/handle-request \
  @apollo-link-debug/handle-errors

# - or -

yarn add \
  @apollo-link-debug/handle-request \
  @apollo-link-debug/handle-errors

Usage

import { ApolloClient, ApolloLink, InMemoryCache } from '@apollo/client';
import { createRequestLink } from '@apollo-link-debug/handle-request';
import { createErrorsLink } from '@apollo-link-debug/handle-errors';

const client = new ApolloClient({
  uri: 'https://localhost:3000/',
  cache: new InMemoryCache(),
  link: ApolloLink.from([createRequestLink(), createErrorsLink()]),
});

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT