Repository navigation
Class Based Custom Decorator? #1230
|
Is it possible to have a Class Based Decorator so it can also have injected services, same as AuthChecker? I searched and didn't see anyone asking this, or see any in the examples. I would like to lighten up the context creation as in many resolver methods, I hardly use some of the properties. I would like to create a parameter decorator for the ones that need a bit more. |
Answered by
MichalLytek
Mar 10, 2022
Replies: 2 comments 3 replies
|
By the way for the question about Class Based Custom Decorator was for as you probably guessed, TSyringe DI reason. Sorry forgot to include that above. |
0 replies
|
WDYM? You can use classes as middleware, while parameter decorator are intended to be fast and simple getter. |
3 replies
Answer selected by
tzarger
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
WDYM? You can use classes as middleware, while parameter decorator are intended to be fast and simple getter.