@graphql-tools/executor 1.2.6 → 1.2.7-alpha-20240619190959-244270581fa4f13efdc1b28b09cc98185189df0e
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/cjs/execution/execute.js +23 -2
- package/esm/execution/execute.js +23 -2
- package/package.json +1 -1
package/cjs/execution/execute.js
CHANGED
|
@@ -620,9 +620,8 @@ function ensureValidRuntimeType(runtimeTypeName, exeContext, returnType, fieldNo
|
|
|
620
620
|
throw (0, utils_1.createGraphQLError)(`Abstract type "${returnType.name}" must resolve to an Object type at runtime for field "${info.parentType.name}.${info.fieldName}". Either the "${returnType.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`, { nodes: fieldNodes });
|
|
621
621
|
}
|
|
622
622
|
// releases before 16.0.0 supported returning `GraphQLObjectType` from `resolveType`
|
|
623
|
-
// TODO: remove in 17.0.0 release
|
|
624
623
|
if ((0, graphql_1.isObjectType)(runtimeTypeName)) {
|
|
625
|
-
|
|
624
|
+
runtimeTypeName = runtimeTypeName.name;
|
|
626
625
|
}
|
|
627
626
|
if (typeof runtimeTypeName !== 'string') {
|
|
628
627
|
throw (0, utils_1.createGraphQLError)(`Abstract type "${returnType.name}" must resolve to an Object type at runtime for field "${info.parentType.name}.${info.fieldName}" with ` +
|
|
@@ -1208,6 +1207,16 @@ function yieldSubsequentPayloads(exeContext) {
|
|
|
1208
1207
|
};
|
|
1209
1208
|
}
|
|
1210
1209
|
class DeferredFragmentRecord {
|
|
1210
|
+
type;
|
|
1211
|
+
errors;
|
|
1212
|
+
label;
|
|
1213
|
+
path;
|
|
1214
|
+
promise;
|
|
1215
|
+
data;
|
|
1216
|
+
parentContext;
|
|
1217
|
+
isCompleted;
|
|
1218
|
+
_exeContext;
|
|
1219
|
+
_resolve;
|
|
1211
1220
|
constructor(opts) {
|
|
1212
1221
|
this.type = 'defer';
|
|
1213
1222
|
this.label = opts.label;
|
|
@@ -1237,6 +1246,18 @@ class DeferredFragmentRecord {
|
|
|
1237
1246
|
}
|
|
1238
1247
|
}
|
|
1239
1248
|
class StreamRecord {
|
|
1249
|
+
type;
|
|
1250
|
+
errors;
|
|
1251
|
+
label;
|
|
1252
|
+
path;
|
|
1253
|
+
items;
|
|
1254
|
+
promise;
|
|
1255
|
+
parentContext;
|
|
1256
|
+
iterator;
|
|
1257
|
+
isCompletedIterator;
|
|
1258
|
+
isCompleted;
|
|
1259
|
+
_exeContext;
|
|
1260
|
+
_resolve;
|
|
1240
1261
|
constructor(opts) {
|
|
1241
1262
|
this.type = 'stream';
|
|
1242
1263
|
this.items = null;
|
package/esm/execution/execute.js
CHANGED
|
@@ -612,9 +612,8 @@ function ensureValidRuntimeType(runtimeTypeName, exeContext, returnType, fieldNo
|
|
|
612
612
|
throw createGraphQLError(`Abstract type "${returnType.name}" must resolve to an Object type at runtime for field "${info.parentType.name}.${info.fieldName}". Either the "${returnType.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`, { nodes: fieldNodes });
|
|
613
613
|
}
|
|
614
614
|
// releases before 16.0.0 supported returning `GraphQLObjectType` from `resolveType`
|
|
615
|
-
// TODO: remove in 17.0.0 release
|
|
616
615
|
if (isObjectType(runtimeTypeName)) {
|
|
617
|
-
|
|
616
|
+
runtimeTypeName = runtimeTypeName.name;
|
|
618
617
|
}
|
|
619
618
|
if (typeof runtimeTypeName !== 'string') {
|
|
620
619
|
throw createGraphQLError(`Abstract type "${returnType.name}" must resolve to an Object type at runtime for field "${info.parentType.name}.${info.fieldName}" with ` +
|
|
@@ -1196,6 +1195,16 @@ function yieldSubsequentPayloads(exeContext) {
|
|
|
1196
1195
|
};
|
|
1197
1196
|
}
|
|
1198
1197
|
class DeferredFragmentRecord {
|
|
1198
|
+
type;
|
|
1199
|
+
errors;
|
|
1200
|
+
label;
|
|
1201
|
+
path;
|
|
1202
|
+
promise;
|
|
1203
|
+
data;
|
|
1204
|
+
parentContext;
|
|
1205
|
+
isCompleted;
|
|
1206
|
+
_exeContext;
|
|
1207
|
+
_resolve;
|
|
1199
1208
|
constructor(opts) {
|
|
1200
1209
|
this.type = 'defer';
|
|
1201
1210
|
this.label = opts.label;
|
|
@@ -1225,6 +1234,18 @@ class DeferredFragmentRecord {
|
|
|
1225
1234
|
}
|
|
1226
1235
|
}
|
|
1227
1236
|
class StreamRecord {
|
|
1237
|
+
type;
|
|
1238
|
+
errors;
|
|
1239
|
+
label;
|
|
1240
|
+
path;
|
|
1241
|
+
items;
|
|
1242
|
+
promise;
|
|
1243
|
+
parentContext;
|
|
1244
|
+
iterator;
|
|
1245
|
+
isCompletedIterator;
|
|
1246
|
+
isCompleted;
|
|
1247
|
+
_exeContext;
|
|
1248
|
+
_resolve;
|
|
1228
1249
|
constructor(opts) {
|
|
1229
1250
|
this.type = 'stream';
|
|
1230
1251
|
this.items = null;
|
package/package.json
CHANGED