Skip to content

A middleware of React Relay Network Layer, which adds graphQL request info to sentry breadcrumb.

License

Notifications You must be signed in to change notification settings

xyy94813/RRNL-sentry-middleware

Repository files navigation

RRNL-sentry-middleware

Node CI Codecov npm package npm downloads

A middleware of React Relay Network Layer, which adds graphQL request info to sentry breadcrumb.

Note: not support batch request now.

Usage

Install

npm i rrnl-sentry-middleware -S
npm i react-relay-network-morden -S
// in browser
npm i @sentry/browser -S
// or in node
// npm i @sentry/node -S

// or use yarn
// yarn add rrnl-sentry-middleware -S
// yarn add react-relay-network-morden -S
// in browser
// yarn add @sentry/browser -S
// or in node
// yarn add @sentry/node -S

Basic Usage

import sentryMiddleware from 'rrnl-sentry-middleware';
import { getCurrentHub } from '@sentry/core';

const network = new RelayNetworkLayer([
  // ... your RelayNetworkLayer middleware
  sentryMiddleware({
    hub: getCurrentHub,
  }),
]);

Contribution

DefinitelyTyped only works because of contributions by users like you!

Git Message

Follow the Angular git commit message specification

But, you can ignore the scope

About

A middleware of React Relay Network Layer, which adds graphQL request info to sentry breadcrumb.

Resources

License

Stars

Watchers

Forks

Packages

No packages published