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,
};
}
)
],
});
# via npm
npm install apollo-server-plugin-bugsnag
# or via yarn
yarn add apollo-server-plugin-bugsnag
# via npm
npm install [email protected]
# or via yarn
yarn add [email protected]