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. |
Beta Was this translation helpful? Give feedback.
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. |
Beta Was this translation helpful? Give feedback.
-
WDYM? You can use classes as middleware, while parameter decorator are intended to be fast and simple getter. |
Beta Was this translation helpful? Give feedback.
WDYM? You can use classes as middleware, while parameter decorator are intended to be fast and simple getter.