graphql-yup-resolver

graphql-yup-resolver JS library on GitHub graphql-yup-resolver JS library on npm Download graphql-yup-resolver JS library

create graphql resolver with yup

Version 2.0.0 License MIT Vulnerabilities 0
graphql-yup-resolver has no homepage
graphql-yup-resolver JS library on GitHub
graphql-yup-resolver JS library on npm
Download graphql-yup-resolver JS library

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