Skip to content

Commit 80f10e2

Browse files
authored
docs(graphql): SchemaDirectiveVisitor requires @graphql-tools/utils@^7
Fixes #2021
1 parent 89970f7 commit 80f10e2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

content/graphql/directives.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ A directive is an identifier preceded by a `@` character, optionally followed by
1010

1111
#### Custom directives
1212

13-
To create a custom schema directive, declare a class which extends the `SchemaDirectiveVisitor` class exported from the `apollo-server` package.
13+
To create a custom schema directive, declare a class which extends the `SchemaDirectiveVisitor` class exported from the `@graphql-tools/utils` package.
1414

1515
```typescript
1616
import { SchemaDirectiveVisitor } from '@graphql-tools/utils';
@@ -32,7 +32,8 @@ export class UpperCaseDirective extends SchemaDirectiveVisitor {
3232

3333
> info **Hint** Note that directives cannot be decorated with the `@Injectable()` decorator. Thus, they are not able to inject dependencies.
3434
>
35-
> warning **Warning** `SchemaDirectiveVisitor` is exported from the `@graphql-tools/utils` package so make sure to install it in your project.
35+
> warning **Warning** `SchemaDirectiveVisitor` is exported from the `@graphql-tools/utils` package. Note that the 8.x release of this package removes this export
36+
> and uses a different and incompatible approach to directives, so make sure to install `@graphql-tools/utils@^7` in your project.
3637
3738
Now, register the `UpperCaseDirective` in the `GraphQLModule.forRoot()` method:
3839

0 commit comments

Comments
 (0)