@graphitation/supermassive 3.15.3 → 3.16.1-canary.1
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/.eslintcache +1 -1
- package/CHANGELOG.md +1 -9
- package/lib/executeWithoutSchema.d.ts.map +1 -1
- package/lib/executeWithoutSchema.js +41 -0
- package/lib/executeWithoutSchema.js.map +2 -2
- package/lib/executeWithoutSchema.mjs +41 -0
- package/lib/executeWithoutSchema.mjs.map +2 -2
- package/lib/schema/definition.d.ts +54 -19
- package/lib/schema/definition.d.ts.map +1 -1
- package/lib/schema/definition.js +127 -18
- package/lib/schema/definition.js.map +3 -3
- package/lib/schema/definition.mjs +109 -16
- package/lib/schema/definition.mjs.map +2 -2
- package/lib/schema/directives.d.ts.map +1 -1
- package/lib/schema/directives.js +9 -4
- package/lib/schema/directives.js.map +2 -2
- package/lib/schema/directives.mjs +10 -5
- package/lib/schema/directives.mjs.map +2 -2
- package/lib/utilities/decodeASTSchema.d.ts.map +1 -1
- package/lib/utilities/decodeASTSchema.js +185 -33
- package/lib/utilities/decodeASTSchema.js.map +2 -2
- package/lib/utilities/decodeASTSchema.mjs +196 -36
- package/lib/utilities/decodeASTSchema.mjs.map +2 -2
- package/lib/utilities/encodeASTSchema.d.ts +5 -1
- package/lib/utilities/encodeASTSchema.d.ts.map +1 -1
- package/lib/utilities/encodeASTSchema.js +171 -38
- package/lib/utilities/encodeASTSchema.js.map +2 -2
- package/lib/utilities/encodeASTSchema.mjs +171 -38
- package/lib/utilities/encodeASTSchema.mjs.map +2 -2
- package/lib/utilities/extractMinimalViableSchemaForRequestDocument.js +1 -1
- package/lib/utilities/extractMinimalViableSchemaForRequestDocument.js.map +2 -2
- package/lib/utilities/extractMinimalViableSchemaForRequestDocument.mjs +2 -2
- package/lib/utilities/extractMinimalViableSchemaForRequestDocument.mjs.map +2 -2
- package/lib/utilities/mergeSchemaDefinitions.d.ts +6 -2
- package/lib/utilities/mergeSchemaDefinitions.d.ts.map +1 -1
- package/lib/utilities/mergeSchemaDefinitions.js +86 -5
- package/lib/utilities/mergeSchemaDefinitions.js.map +3 -3
- package/lib/utilities/mergeSchemaDefinitions.mjs +96 -7
- package/lib/utilities/mergeSchemaDefinitions.mjs.map +3 -3
- package/lib/utilities/subtractSchemaDefinitions.js +4 -4
- package/lib/utilities/subtractSchemaDefinitions.js.map +2 -2
- package/lib/utilities/subtractSchemaDefinitions.mjs +5 -5
- package/lib/utilities/subtractSchemaDefinitions.mjs.map +2 -2
- package/lib/values.js +2 -2
- package/lib/values.js.map +2 -2
- package/lib/values.mjs +4 -4
- package/lib/values.mjs.map +2 -2
- package/package.json +1 -1
|
@@ -356,6 +356,13 @@ function executeField(exeContext, parentTypeName, source, fieldGroup, path, incr
|
|
|
356
356
|
fieldName
|
|
357
357
|
});
|
|
358
358
|
if (!loading) {
|
|
359
|
+
handleMissingSchemaError(
|
|
360
|
+
exeContext,
|
|
361
|
+
void 0,
|
|
362
|
+
fieldGroup,
|
|
363
|
+
path,
|
|
364
|
+
incrementalDataRecord
|
|
365
|
+
);
|
|
359
366
|
return void 0;
|
|
360
367
|
}
|
|
361
368
|
return loading.then(() => {
|
|
@@ -375,6 +382,13 @@ function executeField(exeContext, parentTypeName, source, fieldGroup, path, incr
|
|
|
375
382
|
incrementalDataRecord
|
|
376
383
|
);
|
|
377
384
|
}
|
|
385
|
+
handleMissingSchemaError(
|
|
386
|
+
exeContext,
|
|
387
|
+
void 0,
|
|
388
|
+
fieldGroup,
|
|
389
|
+
path,
|
|
390
|
+
incrementalDataRecord
|
|
391
|
+
);
|
|
378
392
|
return void 0;
|
|
379
393
|
});
|
|
380
394
|
}
|
|
@@ -656,6 +670,24 @@ function handleFieldError(rawError, exeContext, returnTypeRef, fieldGroup, path,
|
|
|
656
670
|
const errors = (_a = incrementalDataRecord == null ? void 0 : incrementalDataRecord.errors) != null ? _a : exeContext.errors;
|
|
657
671
|
errors.push(error);
|
|
658
672
|
}
|
|
673
|
+
function handleMissingSchemaError(exeContext, returnTypeRef, fieldGroup, path, incrementalDataRecord) {
|
|
674
|
+
const parentTypeName = path.typename;
|
|
675
|
+
const isRootField = parentTypeName === "Mutation" || parentTypeName === "Query";
|
|
676
|
+
if (!isRootField) {
|
|
677
|
+
return;
|
|
678
|
+
}
|
|
679
|
+
const fieldName = path.key;
|
|
680
|
+
const message = !returnTypeRef ? `Type definition for ${parentTypeName}.${fieldName} is missing` : `Resolver for ${parentTypeName}.${fieldName} is missing`;
|
|
681
|
+
const error = new Error(message);
|
|
682
|
+
handleFieldError(
|
|
683
|
+
error,
|
|
684
|
+
exeContext,
|
|
685
|
+
returnTypeRef,
|
|
686
|
+
fieldGroup,
|
|
687
|
+
path,
|
|
688
|
+
incrementalDataRecord
|
|
689
|
+
);
|
|
690
|
+
}
|
|
659
691
|
function resolveAndCompleteField(exeContext, parentTypeName, fieldDefinition, fieldGroup, path, source, incrementalDataRecord) {
|
|
660
692
|
var _a;
|
|
661
693
|
const fieldName = fieldGroup[0].name.value;
|
|
@@ -674,6 +706,15 @@ function resolveAndCompleteField(exeContext, parentTypeName, fieldDefinition, fi
|
|
|
674
706
|
path
|
|
675
707
|
);
|
|
676
708
|
const isDefaultResolverUsed = resolveFn === exeContext.fieldResolver || fieldName === "__typename";
|
|
709
|
+
if (resolveFn === exeContext.fieldResolver && typeof source === "undefined") {
|
|
710
|
+
handleMissingSchemaError(
|
|
711
|
+
exeContext,
|
|
712
|
+
returnTypeRef,
|
|
713
|
+
fieldGroup,
|
|
714
|
+
path,
|
|
715
|
+
incrementalDataRecord
|
|
716
|
+
);
|
|
717
|
+
}
|
|
677
718
|
const hooks = exeContext.fieldExecutionHooks;
|
|
678
719
|
let hookContext = void 0;
|
|
679
720
|
try {
|