graphql-compose-mongoose
Advanced tools
Comparing version 9.6.0 to 9.7.0
@@ -44,3 +44,4 @@ "use strict"; | ||
if (!baseModel || !baseModel.discriminators) { | ||
throw Error('Discriminator Key not Set, Use composeWithMongoose for Normal Collections'); | ||
throw Error('Discriminator Key not Set, have you already registered discriminators on your base model? ' + | ||
'Otherwise, use composeWithMongoose for Normal Collections'); | ||
} | ||
@@ -47,0 +48,0 @@ if (!(schemaComposer instanceof graphql_compose_1.SchemaComposer)) { |
@@ -272,3 +272,12 @@ "use strict"; | ||
const fields = valueList.reduce((result, value) => { | ||
const key = value.replace(/[^_a-zA-Z0-9]/g, '_'); | ||
let key; | ||
if (value === null) { | ||
key = 'NULL'; | ||
} | ||
else if (value === '') { | ||
key = 'EMPTY_STRING'; | ||
} | ||
else { | ||
key = value.replace(/[^_a-zA-Z0-9]/g, '_').replace(/(^[0-9])(.*)/g, 'a_$1$2'); | ||
} | ||
result[key] = { value }; | ||
@@ -275,0 +284,0 @@ return result; |
{ | ||
"name": "graphql-compose-mongoose", | ||
"version": "9.6.0", | ||
"version": "9.7.0", | ||
"description": "Plugin for `graphql-compose` which derive a graphql types from a mongoose model.", | ||
@@ -68,4 +68,4 @@ "license": "MIT", | ||
"semantic-release": "semantic-release", | ||
"test-prev-vers": "yarn add mongoose@5.13.8 --dev && yarn lint && git checkout HEAD -- package.json yarn.lock" | ||
"test-prev-vers": "yarn add mongoose@5.13.8 --dev --ignore-scripts && yarn coverage && git checkout HEAD -- package.json yarn.lock" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
447113
4663
235