-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2nd level interceptor not being invoked #615
Comments
Hey @vivekkatta, |
Hi @kamilmysliwiec, I think you mis-understood my question. I am not expecting original method to be overwritten at all. All I am trying to do is build 2 different logging interceptors. One for Graphql resolvers (where the logging is done in a specific way) another more generic logging interceptor for all other methods. My issue is that the graphql logging interceptor is called but the interceptor decorating another method called by the resolver is not being invoked. Please see the same repo I have created. The 'entering' and 'exiting' log statements for the TestService method is not coming through since the interceptor's 'intercept' method is not being called. Hope this makes sense. Thanks for looking into this! Best, |
This is exactly what I'm talking about @vivekkatta 🙂
won't call |
Ok understood. Any suggestions how I can implement entry and exit logging on the above method sum and similar methods like that? |
|
I thought about creating a custom decorator...but it isn't as convenient as an around interceptor. I'll think of something...Thanks BTW, the library is amazing! |
Thank you a lot 🙂 |
Hi @kamilmysliwiec - Just wanted to provide some feedback that this has tripped me up. I think there's needs to be more explicit documentation that these really only work on controllers (or at least that's how I understand them). |
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
2nd level interceptor not being invoked.
I have a graphql resolver which has an intercepter A associated at the method level [UseInterceptors(A)]. The resolver method calls a service method which has another interceptor B associated [UseInterceptors(B)].
The interceptor A executes as expected but the interceptor B is not even invoked.
Expected behavior
Interceptor B and any other interceptor that is encountered in the lower layers must be invoked.
Minimal reproduction of the problem with instructions
https://github.com/vivekkatta/test-interceptor.git
What is the motivation / use case for changing the behavior?
Environment
The text was updated successfully, but these errors were encountered: