dishka icon indicating copy to clipboard operation
dishka copied to clipboard

add param `inject` for auto inject middlewares

Open IvanKirpichnikov opened this issue 1 year ago • 3 comments

It will be possible to pass your own injection to this parameter. The default injection will be default. This is necessary in order not to have identical middleware in your code with the difference of different injection decorators

IvanKirpichnikov avatar Aug 31 '24 12:08 IvanKirpichnikov

@IvanKirpichnikov we need details here

Tishka17 avatar Sep 03 '24 10:09 Tishka17

I implemented my thoughts in https://github.com/reagento/dishka/pull/238

IvanKirpichnikov avatar Sep 03 '24 20:09 IvanKirpichnikov

I am faced with the problem that my inject decorators analyze kw-only parameters. Due to the fact that the standard auto inject integrations use the default inject, I have to duplicate the code because of this.

This problem can be solved by adding a parameter that accepts the injection function and uses it in the future.

IvanKirpichnikov avatar Sep 10 '24 07:09 IvanKirpichnikov