Catch the highlights of GraphQLConf 2023!Click for recordings.Or check out our recap blog post.
maxTokensPlugin

maxTokensPlugin

Package nameWeekly DownloadsVersionLicenseUpdated
@escape.tech/graphql-armor-max-tokens (opens in a new tab)DownloadsVersionLicenseJun 27th, 2023

@escape.tech/graphql-armor-max-tokens

Limit the number of tokens in a GraphQL document.

It is used to prevent DOS attack, heap overflow or server overloading.

Installation

This plugin is bundled within GraphQL Armor, so you don't need to install it separately.

However, for a standalone usage, you can install it with:

# npm
npm install @escape.tech/graphql-armor-max-tokens
 
# yarn
yarn add @escape.tech/graphql-armor-max-tokens

Documentation

https://escape.tech/graphql-armor/docs/plugins/max-tokens (opens in a new tab)