@graphql-tools/delegate 6.0.10-alpha-19feca2.0 → 6.0.10
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/index.cjs.js +5 -2
- package/index.cjs.js.map +1 -1
- package/index.esm.js +4 -3
- package/index.esm.js.map +1 -1
- package/package.json +4 -3
package/index.esm.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Kind, typeFromAST, visit, visitWithTypeInfo, getNamedType, isAbstractType, TypeInfo, isObjectType, isInterfaceType, TypeNameMetaFieldDef, getNullableType, isLeafType, isCompositeType, isListType, isSchema, getOperationAST, execute, subscribe, validate, defaultFieldResolver, parse } from 'graphql';
|
|
2
|
-
import { applySchemaTransforms, serializeInputValue, updateArgument, implementsAbstractType,
|
|
2
|
+
import { applySchemaTransforms, serializeInputValue, updateArgument, implementsAbstractType, relocatedError, getErrorsByPathSegment, ERROR_SYMBOL, mergeDeep, getErrors, setErrors, slicedError, collectFields, getResponseKeyFromInfo, mapAsyncIterator, concatInlineFragments } from '@graphql-tools/utils';
|
|
3
|
+
import AggregateError from 'aggregate-error';
|
|
3
4
|
|
|
4
5
|
const OBJECT_SUBSCHEMA_SYMBOL = Symbol('initialSubschema');
|
|
5
6
|
const FIELD_SUBSCHEMA_MAP_SYMBOL = Symbol('subschemaMap');
|
|
@@ -722,7 +723,7 @@ function handleNull(errors) {
|
|
|
722
723
|
if (errors.length) {
|
|
723
724
|
if (errors.some(error => !error.path || error.path.length < 2)) {
|
|
724
725
|
if (errors.length > 1) {
|
|
725
|
-
const combinedError = new
|
|
726
|
+
const combinedError = new AggregateError(errors);
|
|
726
727
|
return combinedError;
|
|
727
728
|
}
|
|
728
729
|
const error = errors[0];
|
|
@@ -1277,7 +1278,7 @@ function validateRequest(targetSchema, document) {
|
|
|
1277
1278
|
const errors = validate(targetSchema, document);
|
|
1278
1279
|
if (errors.length > 0) {
|
|
1279
1280
|
if (errors.length > 1) {
|
|
1280
|
-
const combinedError = new
|
|
1281
|
+
const combinedError = new AggregateError(errors);
|
|
1281
1282
|
throw combinedError;
|
|
1282
1283
|
}
|
|
1283
1284
|
const error = errors[0];
|