jsonapi-server
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -0,1 +1,3 @@ | ||
- 2016-09-29 - v2.0.2 | ||
- 2016-09-29 - Better Joi to GraphQL type conversion | ||
- 2016-09-29 - v2.0.1 | ||
@@ -2,0 +4,0 @@ - 2016-09-29 - Adding use-strict to all files |
@@ -8,2 +8,6 @@ 'use strict' | ||
let type = joiScheme._type | ||
if (type === 'any') { | ||
// { _valids: { _set: [ 'M', 'F' ] } } | ||
type = typeof (joiScheme._valids._set || [ ])[0] | ||
} | ||
if (type === 'date') { | ||
@@ -15,4 +19,9 @@ type = 'string' | ||
} | ||
const uType = type[0].toUpperCase() + type.substring(1) | ||
type = graphQl[`GraphQL${uType}`] | ||
if (!type) { | ||
throw new Error('Unable to parse Joi type, got ' + JSON.stringify(joiScheme)) | ||
} | ||
return type | ||
@@ -19,0 +28,0 @@ } |
{ | ||
"name": "jsonapi-server", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "A config driven NodeJS framework implementing json:api", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
266923
6264