Log all GraphQL errors (#951)

This commit is contained in:
Kamil Kisiela 2023-01-05 12:36:51 +01:00 committed by GitHub
parent 21a135b9d4
commit 28c62fbec1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -158,10 +158,10 @@ export const graphqlHandler = (options: GraphQLHandlerOptions): RouteHandlerMeth
useSentryUser(),
useErrorHandler(({ errors, context }): void => {
for (const error of errors) {
// Only log unexpected errors.
if (isGraphQLError(error)) {
continue;
}
// // Only log unexpected errors.
// if (isGraphQLError(error)) {
// continue;
// }
if (hasFastifyRequest(context)) {
context.req.log.error(error);