4.0.0 • Published 7 months ago

@envelop/depth-limit v4.0.0

Weekly downloads
67
License
MIT
Repository
github
Last release
7 months ago

@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 { execute, parse, specifiedRules, subscribe, validate } from 'graphql'
import { envelop, useEngine } from '@envelop/core'
import { useDepthLimit } from '@envelop/depth-limit'

const getEnveloped = envelop({
  plugins: [
    useEngine({ parse, validate, specifiedRules, execute, subscribe }),
    // ... other plugins ...
    useDepthLimit({
      maxDepth: 10
      // ignore: [ ... ] - you can set this to ignore specific fields or types
    })
  ]
})

Notes

You can find more details here: https://www.npmjs.com/package/graphql-depth-limit#documentation

4.0.0

7 months ago

3.0.3

8 months ago

3.0.2

8 months ago

3.0.1

9 months ago

3.0.0

12 months ago

2.0.5

1 year ago

2.0.6

1 year ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.4

1 year ago

2.0.1

2 years ago

2.0.0

2 years ago

1.6.2

2 years ago

1.6.1

2 years ago

1.6.0

2 years ago

1.8.0

2 years ago

1.7.0

2 years ago

1.5.3

2 years ago

1.5.2

2 years ago

1.5.1

2 years ago

1.5.0

2 years ago

1.4.0

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.3.0

2 years ago

1.2.0

3 years ago

1.2.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago