0.0.3 • Published 11 months ago
envelop-trim-inputs v0.0.3
useTrimInputs
A Envelop Plugin to automatically trim all strings on GraphQL variables before they are processed by the resolvers.
Installation
npm i envelop-trim-inputs
Usage
import { envelop } from "@envelop/core"
import { useTrimInputs } from "envelop-trim-inputs"
const getEnveloped = envelop({
plugins: [
useTrimInputs(),
// other plugins...
],
})
// Then use getEnveloped with our GraphQL server (such as Yoga for example)
Options
None atm.