Apollo Server plugin to capture GraphQL errors and report to sentry
$ yarn add @adikari/apollo-sentry-plugin-serverless @sentry/serverless apollo-server-lambda
Add the plugin in the list of plugins while instantiating the plugin
The sentry must be configured in lambda in order for this plugin to work. Checkout the sentry document to learn how to do so. https://docs.sentry.io/platforms/node/guides/aws-lambda/
new ApolloServer({
...
plugins: [SentryPluginCaptureException()]
})