Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

graphql-yup-resolver

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-yup-resolver

create graphql resolver with yup

latest
Source
npmnpm
Version
2.0.0
Version published
Weekly downloads
4
-50%
Maintainers
1
Weekly downloads
 
Created
Source

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

FAQs

Package last updated on 14 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts