Skip to content

Commit 0854f55

Browse files
Update quick-start.md
1 parent d15fd71 commit 0854f55

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

content/graphql/quick-start.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ When you need to pass module options asynchronously instead of statically, use t
269269
One technique is to use a factory function:
270270

271271
```typescript
272-
GraphQLModule.forRootAsync<ApolloDriverAsyncConfig>({
272+
GraphQLModule.forRootAsync<ApolloDriverConfig>({
273273
driver: ApolloDriver,
274274
useFactory: () => ({
275275
typePaths: ['./**/*.graphql'],
@@ -280,7 +280,7 @@ One technique is to use a factory function:
280280
Like other factory providers, our factory function can be <a href="https://docs.nestjs.com/fundamentals/custom-providers#factory-providers-usefactory">async</a> and can inject dependencies through `inject`.
281281

282282
```typescript
283-
GraphQLModule.forRootAsync<ApolloDriverAsyncConfig>({
283+
GraphQLModule.forRootAsync<ApolloDriverConfig>({
284284
driver: ApolloDriver,
285285
imports: [ConfigModule],
286286
useFactory: async (configService: ConfigService) => ({
@@ -293,7 +293,7 @@ GraphQLModule.forRootAsync<ApolloDriverAsyncConfig>({
293293
Alternatively, you can configure the `GraphQLModule` using a class instead of a factory, as shown below:
294294

295295
```typescript
296-
GraphQLModule.forRootAsync<ApolloDriverAsyncConfig>({
296+
GraphQLModule.forRootAsync<ApolloDriverConfig>({
297297
driver: ApolloDriver,
298298
useClass: GqlConfigService,
299299
}),
@@ -315,7 +315,7 @@ class GqlConfigService implements GqlOptionsFactory {
315315
If you want to reuse an existing options provider instead of creating a private copy inside the `GraphQLModule`, use the `useExisting` syntax.
316316

317317
```typescript
318-
GraphQLModule.forRootAsync<ApolloDriverAsyncConfig>({
318+
GraphQLModule.forRootAsync<ApolloDriverConfig>({
319319
imports: [ConfigModule],
320320
useExisting: ConfigService,
321321
}),

0 commit comments

Comments
 (0)