0.0.3 • Published 11 months ago

envelop-trim-inputs v0.0.3

Weekly downloads
-
License
-
Repository
github
Last release
11 months ago

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.

0.0.3

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago