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

> Limit the number of tokens allowed in a GraphQL document.

Latest version **2.5.1** (published 2025-06-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install @escape.tech/graphql-armor-max-tokens
pnpm add @escape.tech/graphql-armor-max-tokens
yarn add @escape.tech/graphql-armor-max-tokens
bun add @escape.tech/graphql-armor-max-tokens
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 2.5.1 |
| Published | 2025-06-16 |
| First published | 2022-09-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=18.0.0 |
| Dependencies | 1 |
| Unpacked size | 12.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 589 |
| Author | Laurin Quast |
| Maintainers | icarossio, steffthestunt, gby56, mathieu.rousse |

## Links

- npm: https://www.npmjs.com/package/@escape.tech/graphql-armor-max-tokens
- Repository: https://github.com/Escape-Technologies/graphql-armor
- Issues: https://github.com/Escape-Technologies/graphql-armor/issues
- npm.io page: https://npm.io/package/@escape.tech/graphql-armor-max-tokens

## Dependencies (1)

- [graphql](https://npm.io/package/graphql.md) ^16.10.0

## Recent versions

- 2.5.1 (latest) — 2025-06-16
- 2.5.0 — 2024-10-11
- 2.4.0 — 2024-05-23
- 2.3.0 — 2023-12-20
- 2.2.0 — 2023-06-27
- 2.1.0 — 2023-06-18
- 2.0.0 — 2023-05-29
- 1.3.2 — 2023-04-06
- 1.3.1 — 2023-01-09
- 1.3.0 — 2022-11-22
- 1.2.0 — 2022-10-10
- 1.1.1 — 2022-09-30
- 1.1.0 — 2022-09-29
- 1.0.2 — 2022-09-28
- 1.0.1 — 2022-09-08
- … 1 more at https://npm.io/package/@escape.tech/graphql-armor-max-tokens/versions

## README

# @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:

```bash
# 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](https://escape.tech/graphql-armor/docs/plugins/max-tokens)

---
_Source: https://npm.io/package/@escape.tech/graphql-armor-max-tokens · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
