@ovidb/graphql-to-yup
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "@ovidb/graphql-to-yup", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Generate Yup schema from GraphQL", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -25,6 +25,8 @@ # Plugin for graphql-codegen to Generate Yup schema from GraphQL | ||
the-output-file.js: | ||
- @ovidb/graphql-to-yup: | ||
inputTypeNames: | ||
- TheTypesYouWantToGenerateSchemaFor | ||
- AnotherInputType | ||
``` | ||
plugins: | ||
- @ovidb/graphql-to-yup | ||
config: | ||
inputTypeNames: | ||
- TheTypesYouWantToGenerateSchemaFor | ||
- AnotherInputType | ||
``` |
@@ -26,3 +26,3 @@ const getScalarType = (type, required) => { | ||
const getEnumType = (type, required) => { | ||
return `yup.mixed.oneOf([${type | ||
return `yup.mixed().oneOf([${type | ||
.getValues() | ||
@@ -29,0 +29,0 @@ .map(obj => `'${obj.value}'`) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3190
32