Skip to content

Commit d097f27

Browse files
chore(): resolve merge conflicts
2 parents 080898c + cd00626 commit d097f27

File tree

19 files changed

+25534
-584
lines changed

19 files changed

+25534
-584
lines changed

content/discover/who-uses.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@
242242
"https://padfever.com/",
243243
"https://datenlotse.org",
244244
"https://bemum.co",
245-
"https://weoptimeye.ai"
245+
"https://weoptimeye.ai",
246+
"https://nemovote.com"
246247
]
247248
}

content/graphql/scalars.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ import GraphQLJSON from 'graphql-type-json';
9898
}),
9999
],
100100
})
101-
export class ApplicationModule {}
101+
export class AppModule {}
102102
```
103103

104104
Now we can use the `JSON` scalar in our type definitions:

content/microservices/redis.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ All the properties supported by the official [redis](https://www.npmjs.com/packa
6060

6161
Like other microservice transporters, you have <a href="https://docs.nestjs.com/microservices/basics#client">several options</a> for creating a Redis `ClientProxy` instance.
6262

63-
One method for creating an instance is to use use the `ClientsModule`. To create a client instance with the `ClientsModule`, import it and use the `register()` method to pass an options object with the same properties shown above in the `createMicroservice()` method, as well as a `name` property to be used as the injection token. Read more about `ClientsModule` <a href="https://docs.nestjs.com/microservices/basics#client">here</a>.
63+
One method for creating an instance is to use the `ClientsModule`. To create a client instance with the `ClientsModule`, import it and use the `register()` method to pass an options object with the same properties shown above in the `createMicroservice()` method, as well as a `name` property to be used as the injection token. Read more about `ClientsModule` <a href="https://docs.nestjs.com/microservices/basics#client">here</a>.
6464

6565
```typescript
6666
@Module({

content/middlewares.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,3 +241,5 @@ const app = await NestFactory.create(AppModule);
241241
app.use(logger);
242242
await app.listen(3000);
243243
```
244+
245+
> info **Hint** Accessing the DI container in a global middleware is not possible. You can use a [functional middleware](middleware#functional-middleware) instead when using `app.use()`. Alternatively, you can use a class middleware and consume it with `.forRoutes('*')` within the `AppModule` (or any other module).

content/recipes/crud-generator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export class UsersController {
5151
return this.usersService.findOne(+id);
5252
}
5353

54-
@Put(':id')
54+
@Patch(':id')
5555
update(@Param('id') id: string, @Body() updateUserDto: UpdateUserDto) {
5656
return this.usersService.update(+id, updateUserDto);
5757
}

content/recipes/mongodb.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,4 +180,4 @@ import { DatabaseModule } from '../database/database.module';
180180
export class CatsModule {}
181181
```
182182

183-
> info **Hint** Do not forget to import the `CatsModule` into the root `ApplicationModule`.
183+
> info **Hint** Do not forget to import the `CatsModule` into the root `AppModule`.

content/recipes/sql-sequelize.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,4 +140,4 @@ import { DatabaseModule } from '../database/database.module';
140140
export class CatsModule {}
141141
```
142142

143-
> info **Hint** Do not forget to import the `CatsModule` into the root `ApplicationModule`.
143+
> info **Hint** Do not forget to import the `CatsModule` into the root `AppModule`.

content/recipes/sql-typeorm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,4 +151,4 @@ import { PhotoService } from './photo.service';
151151
export class PhotoModule {}
152152
```
153153

154-
> info **Hint** Do not forget to import the `PhotoModule` into the root `ApplicationModule`.
154+
> info **Hint** Do not forget to import the `PhotoModule` into the root `AppModule`.

content/security/rate-limiting.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ The `ThrottlerGuard` can also be used to work with GraphQL requests. Again, the
7575
export class GqlThrottlerGuard extends ThrottlerGuard {
7676
getRequestResponse(context: ExecutionContext) {
7777
const gqlCtx = GqlExecutionContext.create(context);
78-
const ctx = gql.getContext();
79-
return { req, ctx.req, res: ctx.res }
78+
const ctx = gqlCtx.getContext();
79+
return { req: ctx.req, res: ctx.res }
8080
}
8181
}
8282
```

content/techniques/caching.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { AppController } from './app.controller';
2525
imports: [CacheModule.register()],
2626
controllers: [AppController],
2727
})
28-
export class ApplicationModule {}
28+
export class AppModule {}
2929
```
3030

3131
#### Interacting with the Cache store
@@ -113,7 +113,7 @@ import { APP_INTERCEPTOR } from '@nestjs/core';
113113
},
114114
],
115115
})
116-
export class ApplicationModule {}
116+
export class AppModule {}
117117
```
118118

119119
#### Customize caching
@@ -224,7 +224,7 @@ import { AppController } from './app.controller';
224224
],
225225
controllers: [AppController],
226226
})
227-
export class ApplicationModule {}
227+
export class AppModule {}
228228
```
229229
230230
#### Async configuration

0 commit comments

Comments
 (0)