apollo-sentry-link

1.3.0 • Public • Published

Apollo Sentry Link

A simple Apollo Link to record GraphQL queries as breadcrumbs in Sentry to aid debugging.

Behaviour

When added to an Apollo Client this will log GraphQL requests as they are made as breadcrumbs in Sentry. It records the query name, type (query or mutation) and the names of any fragments used.

In development this information is logged to the console instead.

Usage

Add the link to your Apollo Client.

import ApolloSentryLink from 'apollo-sentry-link'

...

const client = new ApolloClient({
  link: ApolloLink.from([
    ApolloSentryLink,
    createHttpLink({ uri: "/graphql" })
  ]),
})

Readme

Keywords

none

Package Sidebar

Install

npm i apollo-sentry-link

Weekly Downloads

28

Version

1.3.0

License

MIT

Unpacked Size

398 kB

Total Files

8

Last publish

Collaborators

  • haegin