Closed cojack closed 5 years ago
Could you provide a small repo which reproduces your issue? PS. Exception filters aren't supported in the current version of @nestjs/graphql
.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
I'm submitting a...
Current behavior
I'm going to split it to two parts:
1) Whenever I add Guard to the Resolver, Interceptor is not executed, stacktrace looks like that (from graphql):
2) When I
throwError
from interceptor when I catch an exception thrown from resolver method, exception filter is not called. Why?Expected behavior
Interceptors should be always called.
Minimal reproduction of the problem with instructions
Then I tried to put Interceptor almost everywhere, fe:
this.app.useGlobalInterceptors(new GraphqlInterceptor());
or for @Module of AppModule
even for:
What is the motivation / use case for changing the behavior?
I would like to manage errors for user output.
Environment