Giter Site home page Giter Site logo

graphql-notify-errors's Introduction

graphql-notify-errors

npm version npm downloads devDependency Status

Send errors captured by graphql to sentry, bugsnag or similar

Installation

npm i graphql-notify-errors

Use

const { formatError, GraphQLError } = require('graphql')
const express = require('express')
const Raven = require('raven')
const NotifyErrors = require('graphql-notify-errors')

Raven.config(process.env.SENTRY_DSN).install()

const filter = err => !(err instanceof GraphQLError)
const options = {
  formatError,
  filter,
  notify: Raven.captureException
}
const notifyErrors = new NotifyErrors(options)
const app = express()
app.use('/graphql', graphqlExpress(req => {
    return {
      schema,
      context: { req },
      formatError: err => notifyErrors.formatError(err)
    }
  })
)

License

MIT

graphql-notify-errors's People

Contributors

lgaticaq avatar renovate-bot avatar

Watchers

 avatar  avatar  avatar  avatar

graphql-notify-errors's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Warning

These dependencies are deprecated:

Datasource Name Replacement PR?
npm eslint-plugin-standard Unavailable

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

npm
package.json
  • eslint 4.19.1
  • eslint-config-standard 11.0.0
  • eslint-plugin-import 2.25.4
  • eslint-plugin-node 6.0.1
  • eslint-plugin-promise 3.8.0
  • eslint-plugin-standard 3.1.0
  • generate-changelog 1.8.0
  • husky 0.14.3
  • lint-staged 7.3.0
  • prettier-standard 8.0.1
  • node >=8
nvm
.nvmrc
  • node v10

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.