GraphQL Depth Limit TS

JSON →
library 1.1.1 ·javascript
verified Jun 7, 2026

A fork of graphql-depth-limit rebuilt for ESM and CJS with TypeScript declarations. Provides a dead-simple validation rule to limit the total depth of GraphQL queries, protecting against cyclical or deeply nested queries that could cause denial-of-service. Current stable version 1.1.1. Unlike cost-based libraries (graphql-query-complexity, graphql-validation-complexity), this library focuses solely on depth because complexity often increases exponentially with depth (e.g., SQL JOINs). Ships both ESM and CJS bundles with type definitions.