go get -u "github.com/nrfta/go-gqlgen-helpers"
// ...
router.Handle("/graphql",
handler.GraphQL(
NewExecutableSchema(Config{Resolvers: &Resolver{}}),
errorhandling.ConfigureErrorPresenterFunc(reportErrorToSentry),
errorhandling.ConfigureRecoverFunc(),
),
)
// ...
func reportErrorToSentry(ctx context.Context, err error) {
// Whatever
}
This project is licensed under the MIT License.