#Injection Scope Bug

2 messages · Page 1 of 1 (latest)

gaunt harness
#

I possibly found a bug. According to the documentation written here https://docs.nestjs.com/fundamentals/injection-scopes a provider is injected as a singleton instance with the Scope.DEFAULT scope. With the Scope.TRANSIENT should create a new instance every time. However by default in my application a provider is being constructed on every DI, so it reaches the constructor on every requested instance and with the Scope.TRANSIENT it only reaches the constructor once.

wintry shale
#

Weird. Got a reproduction?