envelop-trim-inputs
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

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.

Package Sidebar

Install

npm i envelop-trim-inputs

Weekly Downloads

228

Version

0.0.3

License

none

Unpacked Size

4.12 kB

Total Files

5

Last publish

Collaborators

  • ewen-lbh