Skip to content

Commit c41b4fa

Browse files
Geoffroy Empainjohnbiundo
andauthored
Update content/graphql/guards-interceptors.md
Co-Authored-By: John Biundo <[email protected]>
1 parent f4d6dee commit c41b4fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/graphql/guards-interceptors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ async upvotePost(
8888
8989
#### Execute enhancers at the field/method level
9090

91-
In a GraphQL context, interceptors [do not access the full GraphQL response](https://github.com/nestjs/graphql/issues/320#issuecomment-511193229): they only get the response of the `@Query()`/`@Mutation()` method, but not the complete response with the resolved fields. You can tell Nest to execute interceptors (as well as guards and filters) for methods annotated `@ResolveField()` by setting the `fieldResolverEnhancers` option in `GqlModuleOptions`:
91+
In the GraphQL context, Nest does not run **enhancers** (the generic name for interceptors, guards and filters) at the field level [see this issue](https://github.com/nestjs/graphql/issues/320#issuecomment-511193229): they only run for the top level `@Query()`/`@Mutation()` method. You can tell Nest to execute interceptors, guards or filters for methods annotated with `@ResolveField()` by setting the `fieldResolverEnhancers` option in `GqlModuleOptions`. Pass it a list of `'interceptors'`, `'guards'`, and/or `'filters'` as appropriate:
9292

9393
```typescript
9494
GraphQLModule.forRoot({

0 commit comments

Comments
 (0)