Add initial sentry setup

Related to #343 but will probably need a few more changes
This commit is contained in:
Kurt Hutten
2021-06-05 20:32:56 +10:00
parent c38f94558a
commit 2e91c74baf
8 changed files with 230 additions and 4 deletions

View File

@@ -3,6 +3,7 @@ import {
makeMergedSchema,
makeServices,
} from '@redwoodjs/api'
import { createSentryApolloPlugin } from 'src/lib/sentry'
import schemas from 'src/graphql/**/*.{js,ts}'
import services from 'src/services/**/*.{js,ts}'
@@ -16,6 +17,9 @@ export const handler = createGraphQLHandler({
schemas,
services: makeServices({ services }),
}),
plugins: [
createSentryApolloPlugin(),
],
onException: () => {
// Disconnect from your database with an unhandled exception.
db.$disconnect()