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
- Host: GitHub
- URL: https://github.com/getstation/apollo-server-plugin-bugsnag
- Owner: getstation
- License: mit
- Created: 2020-04-07T12:23:20.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-06-25T11:47:35.000Z (almost 4 years ago)
- Last Synced: 2025-01-19T21:15:45.229Z (over 1 year ago)
- Language: TypeScript
- Size: 30.3 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```