A Envelop Plugin to automatically trim all strings on GraphQL variables before they are processed by the resolvers.
npm i envelop-trim-inputs
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)
None atm.