The Guild LogoThe Guild Monogram
Envelop Logo


Get Started

Plugin Hub > useDepthLimit

yarn add @envelop/depth-limit


This plugins uses graphql-depth-limit in order to limit the depth of executed selection sets (by injecting a new GraphQL validation rule into your execution).

Getting Started#

yarn add @envelop/depth-limit

Usage Example#

import { envelop } from '@envelop/core'; import { useDepthLimit } from '@envelop/depth-limit'; const getEnveloped = envelop({ plugins: [ // ... other plugins ... useDepthLimit({ maxDepth: 10, // ignore: [ ... ] - you can set this to ignore specific fields or types }), ], });


You can find more details here:

Plugin Details

Edit on GitHub