An open API service indexing awesome lists of open source software.

https://github.com/getstation/apollo-server-plugin-bugsnag

apollo-server plugin that sends errors to bugsnag
https://github.com/getstation/apollo-server-plugin-bugsnag

Last synced: 12 months ago
JSON representation

apollo-server plugin that sends errors to bugsnag

Awesome Lists containing this project

README

          

## Usage
```typescript
import { getApolloBugsnagPlugin } from 'apollo-server-plugin-bugsnag';

...
const server = new ApolloServer({
...,
plugins: [
getApolloBugsnagPlugin(
// error callback
(event, requestContext) => {
// my context has a `state` object that I can use to enchance
// notify calls
return {
user: requestContext.state.user,
};
}
)
],
});
```

## Install
```shell script
# via npm
npm install apollo-server-plugin-bugsnag
# or via yarn
yarn add apollo-server-plugin-bugsnag
```

### If using bugsnag 6.x
```shell script
# via npm
npm install apollo-server-plugin-bugsnag@1.0.0
# or via yarn
yarn add apollo-server-plugin-bugsnag@1.0.0
```