Character Limit Plugin
Limit number of characters in a GraphQL query document.
This plugin helps you to prevent DoS attacks by hard-limiting the size of the query document.
How to use?
Install the plugin:
Then, add it to your plugins:
Limit number of characters in a GraphQL query document.
This plugin helps you to prevent DoS attacks by hard-limiting the size of the query document.
Install the plugin:
npm install @escape.tech/graphql-armor-character-limityarn add @escape.tech/graphql-armor-character-limitpnpm add @escape.tech/graphql-armor-character-limitbun add @escape.tech/graphql-armor-character-limitThen, add it to your plugins:
import { characterLimitPlugin } from "@escape.tech/graphql-armor-character-limit";
import { defineConfig } from "@graphql-hive/gateway";
export const gatewayConfig = defineConfig({
plugins: () => [
characterLimitPlugin({
maxLength: 15000, // Number of characters allowed | Default: 15000
}),
],
});This site uses cookies for analytics and improving your experience.
By using our services, you consent to cookies.