Skip to content

June 25, 2026

Choose a tag to compare

@theguild-bot theguild-bot released this 25 Jun 14:43
c2079cb

@graphql-hive/gateway@2.10.0

Minor Changes

  • #2433 6ff1264 Thanks @enisdenjo! - Rate limiting now supports per-field identity via identifier template strings and per-field identifyFn with argument access

    identifier template string

    Use {args.argName} or {context.propName} dot-path interpolation to build the rate limit key inline, without writing a function:

    import { defineConfig } from '@graphql-hive/gateway';
    
    export const gatewayConfig = defineConfig({
      rateLimiting: [
        {
          type: 'Query',
          field: 'getProduct',
          max: 10,
          ttl: 60000,
          identifier: '{args.id}',
        },
        {
          type: 'Query',
          field: 'search',
          max: 30,
          ttl: 60000,
          identifier: '{context.ip}',
        },
      ],
    });

    Per-field identifyFn with argument values

    Override the identity function for a single field and receive the resolved argument values as a second parameter, useful for rate limiting unauthenticated requests by argument value:

    import { defineConfig } from '@graphql-hive/gateway';
    
    export const gatewayConfig = defineConfig({
      rateLimiting: [
        {
          type: 'Query',
          field: 'getProduct', // getProduct(id: ID!): Product!
          max: 10,
          ttl: 60000,
          identifyFn: (ctx, args) => String(args.id),
        },
      ],
    });

Patch Changes

@graphql-hive/nestjs@2.0.80

Patch Changes

@graphql-hive/plugin-opentelemetry@1.4.32

Patch Changes

@graphql-hive/router-runtime@1.4.12

Patch Changes