How to log stacktrace on NestJS + GraphQL?

Viewed 123

I'm trying out NestJS + GraphQL using Apollo underneath. When I set the Apollo 'debug' option to be true, I can see the stacktrace in the response but I cannot find a way to log this stacktrace in our application logs.

I would like to have it in the log to troubleshoot issues in production. Is there a way to do this?

1 Answers

I was able to do this using ApolloServerPlugin.

Related