@coderich/autograph 0.13.16 → 0.13.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/schema/Schema.js +8 -8
package/package.json
CHANGED
package/src/schema/Schema.js
CHANGED
|
@@ -176,11 +176,11 @@ module.exports = class Schema {
|
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
if (node.kind === Kind.NON_NULL_TYPE) {
|
|
179
|
-
|
|
179
|
+
target[isList ? 'isArrayRequired' : 'isRequired'] = true;
|
|
180
180
|
} else if (node.kind === Kind.NAMED_TYPE) {
|
|
181
|
-
|
|
181
|
+
target.type = node.name.value;
|
|
182
182
|
} else if (node.kind === Kind.LIST_TYPE) {
|
|
183
|
-
|
|
183
|
+
target.isArray = true;
|
|
184
184
|
isList = true;
|
|
185
185
|
} else if (node.kind === Kind.DIRECTIVE) {
|
|
186
186
|
target.directives[name] = target.directives[name] || {};
|
|
@@ -215,11 +215,11 @@ module.exports = class Schema {
|
|
|
215
215
|
}
|
|
216
216
|
// Field specific directives
|
|
217
217
|
case `${directives.field}-default`: {
|
|
218
|
-
|
|
218
|
+
target.defaultValue = value;
|
|
219
219
|
break;
|
|
220
220
|
}
|
|
221
221
|
case `${directives.field}-connection`: {
|
|
222
|
-
|
|
222
|
+
target.isConnection = value;
|
|
223
223
|
break;
|
|
224
224
|
}
|
|
225
225
|
case `${directives.field}-validate`: { // Alias for finalize
|
|
@@ -227,8 +227,8 @@ module.exports = class Schema {
|
|
|
227
227
|
break;
|
|
228
228
|
}
|
|
229
229
|
case `${directives.link}-by`: {
|
|
230
|
-
|
|
231
|
-
|
|
230
|
+
target.linkBy = value;
|
|
231
|
+
target.isVirtual = true;
|
|
232
232
|
break;
|
|
233
233
|
}
|
|
234
234
|
// Generic by target directives
|
|
@@ -248,7 +248,7 @@ module.exports = class Schema {
|
|
|
248
248
|
// Backwards compat (deprecated)
|
|
249
249
|
case 'model-gqlScope': { model.crud = value; break; }
|
|
250
250
|
case 'model-fieldScope': { model.scope = value; break; }
|
|
251
|
-
case 'field-gqlScope': {
|
|
251
|
+
case 'field-gqlScope': { target.crud = value; break; }
|
|
252
252
|
|
|
253
253
|
// Pipelines
|
|
254
254
|
default: {
|