graphql-yup-resolver
v2.0.0
Published
create graphql resolver with yup
Downloads
105
Readme
graphql-yup-resolver
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