@graphql-tools/utils 8.6.1 → 8.6.2
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.js +2 -1
- package/index.mjs +2 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -4041,6 +4041,7 @@ function visitRoot(root, operation, schema, fragments, variableValues, resultVis
|
|
|
4041
4041
|
return visitObjectValue(root, operationRootType, collectedFields, schema, fragments, variableValues, resultVisitorMap, 0, errors, errorInfo);
|
|
4042
4042
|
}
|
|
4043
4043
|
function visitObjectValue(object, type, fieldNodeMap, schema, fragments, variableValues, resultVisitorMap, pathIndex, errors, errorInfo) {
|
|
4044
|
+
var _a;
|
|
4044
4045
|
const fieldMap = type.getFields();
|
|
4045
4046
|
const typeVisitorMap = resultVisitorMap === null || resultVisitorMap === void 0 ? void 0 : resultVisitorMap[type.name];
|
|
4046
4047
|
const enterObject = typeVisitorMap === null || typeVisitorMap === void 0 ? void 0 : typeVisitorMap.__enter;
|
|
@@ -4056,7 +4057,7 @@ function visitObjectValue(object, type, fieldNodeMap, schema, fragments, variabl
|
|
|
4056
4057
|
}
|
|
4057
4058
|
for (const [responseKey, subFieldNodes] of fieldNodeMap) {
|
|
4058
4059
|
const fieldName = subFieldNodes[0].name.value;
|
|
4059
|
-
const fieldType = fieldName === '__typename' ? graphql.TypeNameMetaFieldDef.type : fieldMap[fieldName].type;
|
|
4060
|
+
const fieldType = fieldName === '__typename' ? graphql.TypeNameMetaFieldDef.type : (_a = fieldMap[fieldName]) === null || _a === void 0 ? void 0 : _a.type;
|
|
4060
4061
|
const newPathIndex = pathIndex + 1;
|
|
4061
4062
|
let fieldErrors;
|
|
4062
4063
|
if (errorMap) {
|
package/index.mjs
CHANGED
|
@@ -4039,6 +4039,7 @@ function visitRoot(root, operation, schema, fragments, variableValues, resultVis
|
|
|
4039
4039
|
return visitObjectValue(root, operationRootType, collectedFields, schema, fragments, variableValues, resultVisitorMap, 0, errors, errorInfo);
|
|
4040
4040
|
}
|
|
4041
4041
|
function visitObjectValue(object, type, fieldNodeMap, schema, fragments, variableValues, resultVisitorMap, pathIndex, errors, errorInfo) {
|
|
4042
|
+
var _a;
|
|
4042
4043
|
const fieldMap = type.getFields();
|
|
4043
4044
|
const typeVisitorMap = resultVisitorMap === null || resultVisitorMap === void 0 ? void 0 : resultVisitorMap[type.name];
|
|
4044
4045
|
const enterObject = typeVisitorMap === null || typeVisitorMap === void 0 ? void 0 : typeVisitorMap.__enter;
|
|
@@ -4054,7 +4055,7 @@ function visitObjectValue(object, type, fieldNodeMap, schema, fragments, variabl
|
|
|
4054
4055
|
}
|
|
4055
4056
|
for (const [responseKey, subFieldNodes] of fieldNodeMap) {
|
|
4056
4057
|
const fieldName = subFieldNodes[0].name.value;
|
|
4057
|
-
const fieldType = fieldName === '__typename' ? TypeNameMetaFieldDef.type : fieldMap[fieldName].type;
|
|
4058
|
+
const fieldType = fieldName === '__typename' ? TypeNameMetaFieldDef.type : (_a = fieldMap[fieldName]) === null || _a === void 0 ? void 0 : _a.type;
|
|
4058
4059
|
const newPathIndex = pathIndex + 1;
|
|
4059
4060
|
let fieldErrors;
|
|
4060
4061
|
if (errorMap) {
|