Currently, only the built-in CLS_REQ and CLS_RES proxy providers are able to be injected in other proxy providers.
There is only a partial support for injecting custom proxy providers with some manual work by calling await cls.resolveProxyProviders(TheOtherProvider) in proxy provider factories when they depend on other proxy providers and their value is needed at the time of construction.
There is no support for this workflow in class proxy providers, because the constructor must be synchronous, but resolving proxy providers is an asynchronous operation.
Solution: when resolving proxy providers, scan their dependency array for other proxy providers and resolve those first. That should ensure that dependent proxy providers are always resolved when needed in other proxy providers.
Currently, only the built-in
CLS_REQ
andCLS_RES
proxy providers are able to be injected in other proxy providers.There is only a partial support for injecting custom proxy providers with some manual work by calling
await cls.resolveProxyProviders(TheOtherProvider)
in proxy provider factories when they depend on other proxy providers and their value is needed at the time of construction.There is no support for this workflow in class proxy providers, because the constructor must be synchronous, but resolving proxy providers is an asynchronous operation.
Solution: when resolving proxy providers, scan their dependency array for other proxy providers and resolve those first. That should ensure that dependent proxy providers are always resolved when needed in other proxy providers.