@aikidosec/firewall
Version:
Zen by Aikido is an embedded Web Application Firewall that autonomously protects Node.js apps against common and critical attacks
20 lines (19 loc) • 568 B
TypeScript
import type { ExecutionArgs } from "graphql/execution/execute";
import { FieldNode } from "graphql";
import { Agent } from "../../agent/Agent";
import { Context } from "../../agent/Context";
type Result = {
block: false;
} | {
block: true;
field: FieldNode;
source: "ip";
remoteAddress: string;
} | {
block: true;
field: FieldNode;
source: "user";
userId: string;
};
export declare function shouldRateLimitOperation(agent: Agent, context: Context, executeArgs: Pick<ExecutionArgs, "document" | "operationName">): Result;
export {};