Skip to content

Commit fc675ba

Browse files
Merge pull request #2944 from micalevisk/patch-1
docs(fundamentals): clarify that injecting request provider makes the consumer request-scoped
2 parents f97033f + cb8f5ac commit fc675ba

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

content/fundamentals/provider-scopes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ Transient-scoped dependencies don't follow that pattern. If a singleton-scoped `
8080

8181
In an HTTP server-based application (e.g., using `@nestjs/platform-express` or `@nestjs/platform-fastify`), you may want to access a reference to the original request object when using request-scoped providers. You can do this by injecting the `REQUEST` object.
8282

83+
The `REQUEST` provider is request-scoped, so you don't need to explicitly use the `REQUEST` scope in this case.
84+
8385
```typescript
8486
import { Injectable, Scope, Inject } from '@nestjs/common';
8587
import { REQUEST } from '@nestjs/core';

0 commit comments

Comments
 (0)