Skip to content

Commit

Permalink
upgrade genie
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyEntropy committed Aug 20, 2018
1 parent c896c08 commit fa17288
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 34 deletions.
27 changes: 17 additions & 10 deletions dist/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -66747,11 +66747,9 @@ var introspectionQuerySansSubscriptions = exports.introspectionQuerySansSubscrip

directive @unique on FIELD_DEFINITION

directive @updatedTimestamp on FIELD_DEFINITION
directive @updatedTimestamp(allowManual: Boolean = false) on FIELD_DEFINITION

directive @createdTimestamp on FIELD_DEFINITION

directive @createdTimestamp on FIELD_DEFINITION
directive @createdTimestamp(allowManual: Boolean = false) on FIELD_DEFINITION

"""
An object with an ID
Expand Down Expand Up @@ -66878,6 +66876,9 @@ var introspectionQuerySansSubscriptions = exports.introspectionQuerySansSubscrip
const type = field.type;
if (type.name === 'DateTime') {
field['updatedTimestamp'] = true;
if (this.args && this.args.allowManual) {
field['updatedTimestampAllowManual'] = true;
}
}
}
}
Expand All @@ -66886,6 +66887,9 @@ var introspectionQuerySansSubscriptions = exports.introspectionQuerySansSubscrip
const type = field.type;
if (type.name === 'DateTime') {
field.createdTimestamp = true;
if (this.args && this.args.allowManual) {
field['createdTimestampAllowManual'] = true;
}
}
}
}
Expand Down Expand Up @@ -66970,10 +66974,10 @@ var introspectionQuerySansSubscriptions = exports.introspectionQuerySansSubscrip
if (field.name === 'id') {
isAutoField = true;
}
else if (lodash.get(field, 'metadata.updatedTimestamp') === true) {
else if (lodash.get(field, 'metadata.updatedTimestamp') === true && !lodash.get(field, 'metadata.updatedTimestampAllowManual', false)) {
isAutoField = true;
}
else if (lodash.get(field, 'metadata.createdTimestamp') === true) {
else if (lodash.get(field, 'metadata.createdTimestamp') === true && !lodash.get(field, 'metadata.createdTimestampAllowManual', false)) {
isAutoField = true;
}
}
Expand Down Expand Up @@ -70861,7 +70865,9 @@ var introspectionQuerySansSubscriptions = exports.introspectionQuerySansSubscrip
this.addInputHook(name, (context, record) => {
switch (context.request.method) {
case 'create':
record[field.name] = new Date();
if ((isArray && lodash.isEmpty(record[field.name])) || !record[field.name]) {
record[field.name] = new Date();
}
return record;
}
});
Expand All @@ -70872,7 +70878,9 @@ var introspectionQuerySansSubscriptions = exports.introspectionQuerySansSubscrip
case 'update':
if (!('replace' in update))
update.replace = {};
update.replace[field.name] = new Date();
if ((isArray && lodash.isEmpty(update.replace[field.name])) || !update.replace[field.name]) {
update.replace[field.name] = new Date();
}
return update;
}
});
Expand Down Expand Up @@ -70905,7 +70913,6 @@ var introspectionQuerySansSubscriptions = exports.introspectionQuerySansSubscrip
fields[field.name] = currType;
}
fields.__typename = String;
fields.importID = String;
});
const fortuneName = this.getFortuneTypeName(name);
const fortuneConfigForName = fortuneConfig[fortuneName] ? fortuneConfig[fortuneName] : {};
Expand Down Expand Up @@ -71597,7 +71604,7 @@ var introspectionQuerySansSubscriptions = exports.introspectionQuerySansSubscrip
Note when merging list fields by default the array in the provided data will replace the existing data array. If you don't want to do that instead of providing an array you can provide an object with fields for push and pull or set. `
},
defaultTypename: {
type: _graphql.GraphQLBoolean,
type: _graphql.GraphQLString,
descriptions: 'Must be provided if every object in data does not have a `__typename` property or ids with the typename encoded'
},
conditions: {
Expand Down
2 changes: 1 addition & 1 deletion dist/main.js.map

Large diffs are not rendered by default.

50 changes: 27 additions & 23 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@
glob-to-regexp "^0.3.0"

"@nodelib/fs.stat@^1.0.1":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.0.tgz#50c1e2260ac0ed9439a181de3725a0168d59c48a"
version "1.1.1"
resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.1.tgz#53f349bb986ab273d601175aa1b25a655ab90ee3"

"@samverschueren/stream-to-observable@^0.3.0":
version "0.3.0"
Expand Down Expand Up @@ -343,13 +343,13 @@ ajv@^5.2.3, ajv@^5.3.0:
json-schema-traverse "^0.3.0"

ajv@^6.1.0:
version "6.5.2"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.2.tgz#678495f9b82f7cca6be248dd92f59bff5e1f4360"
version "6.5.3"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.3.tgz#71a569d189ecf4f4f321224fecb166f071dd90f9"
dependencies:
fast-deep-equal "^2.0.1"
fast-json-stable-stringify "^2.0.0"
json-schema-traverse "^0.4.1"
uri-js "^4.2.1"
uri-js "^4.2.2"

alphanum-sort@^1.0.1, alphanum-sort@^1.0.2:
version "1.0.2"
Expand Down Expand Up @@ -545,8 +545,8 @@ async@^2.6.0:
lodash "^4.17.10"

atob@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.1.tgz#ae2d5a729477f289d60dd7f96a6314a22dd6c22a"
version "2.1.2"
resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"

autoprefixer@^6.3.1:
version "6.7.7"
Expand Down Expand Up @@ -2810,8 +2810,8 @@ flatten@^1.0.2:
resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782"

flow-parser@^0.*:
version "0.79.0"
resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.79.0.tgz#9e58cfc04c6b9185bc64da480fc12d7032fe93e4"
version "0.79.1"
resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.79.1.tgz#bd556bf1b0416e6a3ada6398df360c3747cecf3f"

flush-write-stream@^1.0.0:
version "1.0.3"
Expand Down Expand Up @@ -3126,8 +3126,8 @@ graphql-genie-subscriptions@^1.0.8:
resolved "https://registry.yarnpkg.com/graphql-genie-subscriptions/-/graphql-genie-subscriptions-1.0.9.tgz#632765282de0aab2ba822ac4c08a3e0b3cd30195"

graphql-genie@^0.4.0:
version "0.4.8"
resolved "https://registry.yarnpkg.com/graphql-genie/-/graphql-genie-0.4.8.tgz#1428c910547817fbbe80f3763ebcf4b0ce6a39c9"
version "0.4.10"
resolved "https://registry.yarnpkg.com/graphql-genie/-/graphql-genie-0.4.10.tgz#331f0b1da17844ebdc97af97a67869d5c91b14a4"
dependencies:
abab "^2.0.0"
graphql-iso-date "^3.5.0"
Expand Down Expand Up @@ -4398,7 +4398,11 @@ miller-rabin@^4.0.0:
bn.js "^4.0.0"
brorand "^1.0.1"

"mime-db@>= 1.34.0 < 2", mime-db@~1.35.0:
"mime-db@>= 1.34.0 < 2":
version "1.36.0"
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.36.0.tgz#5020478db3c7fe93aad7bbcc4dcf869c43363397"

mime-db@~1.35.0:
version "1.35.0"
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.35.0.tgz#0569d657466491283709663ad379a99b90d9ab47"

Expand Down Expand Up @@ -5081,8 +5085,8 @@ pluralize@^7.0.0:
resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777"

portfinder@^1.0.9:
version "1.0.16"
resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.16.tgz#a6a68be9c352bc66c1a4c17a261f661f3facaf52"
version "1.0.17"
resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.17.tgz#a8a1691143e46c4735edefcf4fbcccedad26456a"
dependencies:
async "^1.5.2"
debug "^2.2.0"
Expand Down Expand Up @@ -5730,8 +5734,8 @@ remove-trailing-separator@^1.0.1:
resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef"

repeat-element@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a"
version "1.1.3"
resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce"

repeat-string@^1.5.2, repeat-string@^1.6.1:
version "1.6.1"
Expand Down Expand Up @@ -5924,8 +5928,8 @@ selfsigned@^1.9.1:
node-forge "0.7.5"

"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0:
version "5.5.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab"
version "5.5.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477"

[email protected]:
version "0.16.2"
Expand Down Expand Up @@ -6133,8 +6137,8 @@ source-map-support@^0.4.15:
source-map "^0.5.6"

source-map-support@^0.5.3:
version "0.5.8"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.8.tgz#04f5581713a8a65612d0175fbf3a01f80a162613"
version "0.5.9"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.9.tgz#41bc953b2534267ea2d605bccfa7bfa3111ced5f"
dependencies:
buffer-from "^1.0.0"
source-map "^0.6.0"
Expand Down Expand Up @@ -6349,8 +6353,8 @@ supports-color@^3.2.3:
has-flag "^1.0.0"

supports-color@^5.1.0, supports-color@^5.3.0, supports-color@^5.4.0:
version "5.4.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54"
version "5.5.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
dependencies:
has-flag "^3.0.0"

Expand Down Expand Up @@ -6645,7 +6649,7 @@ upath@^1.0.5:
version "1.1.0"
resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.0.tgz#35256597e46a581db4793d0ce47fa9aebfc9fabd"

uri-js@^4.2.1:
uri-js@^4.2.2:
version "4.2.2"
resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0"
dependencies:
Expand Down

0 comments on commit fa17288

Please sign in to comment.