7.1.3 • Published 9 months ago

@envelop/disable-introspection v7.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

@envelop/disable-introspection

This plugin injects the NoSchemaIntrospectionCustomRule validation rule exported from the graphql module to the validation phase for disabling introspection.

Getting Started

yarn add @envelop/disable-introspection

Usage Example

import { execute, parse, specifiedRules, subscribe, validate } from 'graphql'
import { envelop, useEngine } from '@envelop/core'
import { useDisableIntrospection } from '@envelop/disable-introspection'

const getEnveloped = envelop({
  plugins: [
    useEngine({ parse, validate, specifiedRules, execute, subscribe }),
    useDisableIntrospection()
  ]
})

Optional configuration

The plugin optionally accepts a configuration object:

{
  disableIf?: ({context, params}) => boolean
}
  • disableIf: A function that allow you to evaluate the need to disable introspection, based on the incoming operation. If introspection needs to be disabled/enabled based on the dynamic parameter (GraphQL operation, or, incoming request/headers), use this function to determine when introspection needs to be disabled. Return true for disabling the introspection for the incoming operation, or false to allow introspection.
7.0.0

10 months ago

7.0.1

9 months ago

7.1.3

9 months ago

7.1.2

9 months ago

7.1.1

9 months ago

7.1.0

9 months ago

5.0.3

2 years ago

5.0.2

2 years ago

5.0.1

2 years ago

6.0.0

2 years ago

4.0.5

3 years ago

4.0.6

3 years ago

5.0.0

3 years ago

4.0.4

3 years ago

4.0.1

3 years ago

4.0.0

3 years ago

4.0.3

3 years ago

4.0.2

3 years ago

3.6.0

3 years ago

3.5.0

3 years ago

3.4.0

3 years ago

3.4.2

3 years ago

3.4.1

3 years ago

3.3.3

4 years ago

3.3.2

4 years ago

3.3.1

4 years ago

3.3.0

4 years ago

3.2.0

4 years ago

2.0.0

4 years ago

3.0.0

4 years ago

3.1.0

4 years ago

1.2.0

4 years ago

1.2.1

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago

0.0.1

5 years ago

0.0.0

5 years ago