@ovidb/graphql-to-yup

1.0.3 • Public • Published

Plugin for graphql-codegen to Generate Yup schema from GraphQL

Currently only works with input types

##Usage

Install

If you want to run it from your project:

npm install --save-dev @ovidb/graphql-to-yup

you could also install it globally:

npm install -g @ovidb/graphql-to-yup

Setup using codegen.yml

You will need to create a codegen.yml file

schema: point/to/your/schema.graphql
generates:
  the-output-file.js:
    plugins:
      - @ovidb/graphql-to-yup
    config:
      inputTypeNames:
        - TheTypesYouWantToGenerateSchemaFor
        - AnotherInputType

Package Sidebar

Install

npm i @ovidb/graphql-to-yup

Weekly Downloads

3

Version

1.0.3

License

ISC

Unpacked Size

3.19 kB

Total Files

4

Last publish

Collaborators

  • ovidbme