Skip to content

Commit b2360b2

Browse files
Merge pull request #1835 from mihainsto/docs/security/rate-limiting/bug-fixes
docs(rate-limiting): fix graphql code snippet bugs
2 parents d2788b3 + fc16775 commit b2360b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/security/rate-limiting.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ The `ThrottlerGuard` can also be used to work with GraphQL requests. Again, the
7171
export class GqlThrottlerGuard extends ThrottlerGuard {
7272
getRequestResponse(context: ExecutionContext) {
7373
const gqlCtx = GqlExecutionContext.create(context);
74-
const ctx = gql.getContext();
75-
return { req, ctx.req, res: ctx.res }
74+
const ctx = gqlCtx.getContext();
75+
return { req: ctx.req, res: ctx.res }
7676
}
7777
}
7878
```

0 commit comments

Comments
 (0)