Skip to content

Commit 23aca50

Browse files
Merge pull request #2022 from sgarner/patch-1
docs(graphql): SchemaDirectiveVisitor requires @graphql-tools/utils@^7
2 parents 89970f7 + 11ce816 commit 23aca50

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

content/graphql/directives.md

Lines changed: 3 additions & 3 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';
@@ -31,8 +31,8 @@ export class UpperCaseDirective extends SchemaDirectiveVisitor {
3131
```
3232

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

0 commit comments

Comments
 (0)