rate-limit.js 246 Bytes EditWeb IDE 1 2 3 4 5 const { createRateLimitDirective } = require('graphql-rate-limit-directive') module.exports = createRateLimitDirective({ keyGenerator: (directiveArgs, source, args, context, info) => `${context.req.ip}:${info.parentType}.${info.fieldName}` })