Skip to content

Commit ac4c788

Browse files
authored
Clarify circular dependency usage with Scope.REQUEST
After spending a couple of hours debugging an issue with circular dependencies and Scope.REQUEST, I had some conversations over Discord and it was agreed that adding the following clarification will be helpful.
1 parent 71bb3bf commit ac4c788

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/fundamentals/circular-dependency.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export class CommonService {
5454
}
5555
```
5656

57-
> warning **Warning** The order of instantiation is indeterminate. Make sure your code does not depend on which constructor is called first.
57+
> warning **Warning** The order of instantiation is indeterminate. Make sure your code does not depend on which constructor is called first. Having circular dependencies depend on providers with Scope.REQUEST can lead to undefined dependencies. More information available [here](https://github.com/nestjs/nest/issues/5778)
5858
5959
#### ModuleRef class alternative
6060

0 commit comments

Comments
 (0)