Skip to content

Latest commit

 

History

History
34 lines (27 loc) · 708 Bytes

README.md

File metadata and controls

34 lines (27 loc) · 708 Bytes

@envelop/pruned-schema

This plugins clean up the registered schema by removing unused and empty types.

Getting Started

yarn add @envelop/pruned-schema

Usage Example

See @graphql-tools/utils/pruneSchema for the list of available options.

import { execute, parse, subscribe, validate } from 'graphql'
import { envelop } from '@envelop/core'
import { usePrunedSchema } from '@envelop/response-cache'

const getEnveloped = envelop({
  parse,
  validate,
  execute,
  subscribe,
  plugins: [
    // ... other plugins ...
    usePrunedSchema({
      // pruneSchema options
    })
  ]
})