Closed Rafat97 closed 1 year ago
Please provide a minimum reproduction repository (Git repository/StackBlitz/CodeSandbox project).
Please provide a minimum reproduction repository (Git repository/StackBlitz/CodeSandbox project).
why reproductions are required
https://stackblitz.com/edit/nestjs-typescript-starter-evkpln?file=src/config/config.module.ts
Can I update documentation? @jmcdo29
Rather than accessing ctx.req.res
you should be able to set the gql context
option to be context: ({ req, res }) => ({ req, res })
and get the current solution that the docs show
Rather than accessing
ctx.req.res
you should be able to set the gqlcontext
option to becontext: ({ req, res }) => ({ req, res })
and get the current solution that the docs show
May be we should mention this here. Or we can create an example.
What do you think @jmcdo29?
I'm submitting a...
Current behavior
Docs link
https://docs.nestjs.com/security/rate-limiting#graphql
Current Code
Error Message:
TypeError: Cannot read properties of undefined (reading 'header') at GqlThrottlerGuard.handleRequest (C:\Users\User\Documents\GitHub\erp\node_modules\@nestjs\throttler\src\throttler.guard.ts:89:9) at processTicksAndRejections (node:internal/process/task_queues:96:5)
Minimal reproduction of the problem with instructions
https://stackblitz.com/edit/nestjs-typescript-starter-evkpln?file=src/config/config.module.ts
What is the motivation / use case for changing the behavior?
Code will be
Environment
For Tooling issues:
Others: