graphql-yup-resolver
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

graphql-yup-resolver

npm node-current CircleCI Coverage Status

yeah graphql have scalars, but? but?

! since 2.0.0 typescript support available, i rewriten this library with typescript.

Installation

straight forward:

Make sure you install yup first:

yarn add yup

Then install this lib:

yarn add graphql-yup-resolver

Usage Example

/* your-resolver.js */

const createYupResolver = require('graphql-yup-resolver');

const fn = createYupResolver({

  // graphql args
  args: {
    name: yup.string().required().min(3),
  },

  // actual resolver, protected by yup
  resolver: (_, { name }) => `hello ${name}!`,

});

Build Targets

Node-Target-Mapping
Current build focused to node 10

LICENSE

Readme

Keywords

none

Package Sidebar

Install

npm i graphql-yup-resolver

Weekly Downloads

12

Version

2.0.0

License

MIT

Unpacked Size

5.07 kB

Total Files

4

Last publish

Collaborators

  • xprycker