UNPKG

@graphql-mesh/transform-rate-limit

Version:
14 lines (13 loc) 833 B
import type { ExecutionResult } from 'graphql'; import type { MeshTransform, MeshTransformOptions, YamlConfig } from '@graphql-mesh/types'; import type { DelegationContext } from '@graphql-tools/delegate'; import type { ExecutionRequest } from '@graphql-tools/utils'; export default class RateLimitTransform implements MeshTransform { private pathRateLimitDef; private tokenMap; private timeouts; constructor(options: MeshTransformOptions<YamlConfig.RateLimitTransformConfig[]>); private errors; transformRequest(executionRequest: ExecutionRequest, delegationContext: DelegationContext): ExecutionRequest; transformResult(result: ExecutionResult, delegationContext: DelegationContext): ExecutionResult<import("graphql/jsutils/ObjMap").ObjMap<unknown>, import("graphql/jsutils/ObjMap").ObjMap<unknown>>; }