Skip to content

Commit eedd038

Browse files
authored
docs(graphql): Fix incorrect import
The existing example will error with the following message: ``` ❯ npm start > [email protected] start > nest start src/common/plugins/complexity.plugin.ts:1:29 - error TS2305: Module '"@nestjs/graphql"' has no exported member 'Plugin'. 1 import { GraphQLSchemaHost, Plugin } from "@nestjs/graphql"; ~~~~~~ Found 1 error(s). ``` This same change was made in the samples a few months ago: nestjs/nest@d8ba5d1#diff-5b158b02130ed8dc4bbebe1b6b42e0ecee7573c44e3850dd013c26765dd52b67
1 parent 3f0e19d commit eedd038

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

content/graphql/complexity.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ $ npm install --save graphql-query-complexity
1919
Once the installation process is complete, we can define the `ComplexityPlugin` class:
2020

2121
```typescript
22-
import { GraphQLSchemaHost, Plugin } from '@nestjs/graphql';
22+
import { GraphQLSchemaHost } from "@nestjs/graphql";
23+
import { Plugin } from "@nestjs/apollo";
2324
import {
2425
ApolloServerPlugin,
2526
GraphQLRequestListener,

0 commit comments

Comments
 (0)