3.0.2 • Published 2 years ago

envelop-no-batched-queries v3.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

No Batched Queries - Envelop Plugin

This package is an envelop plugin version of graphql-no-batched-queries validation directive.

Install

npm i envelop-no-batched-queries

Usage

import { envelop } from '@envelop/core'
import { useNoBatchedQueries } from 'envelop-no-batched-queries'

// allow 2 queries or mutations per request (default is 1)
const batchValidation = useNoBatchedQueries({ allow: 2 })

const getEnveloped = envelop({
  plugins: [batchValidation]
})