You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rename runtimeType(Name) to possibleRuntimeType(Name)
because it could not be the runtime type(name), could be an intermediate interface
I considered just renaming it to resolvedTypeName, but that's confusing, because the variable could hold a promise, and resolvedResolvedTypeName overloads "resolve"
@@ -840,7 +840,7 @@ function completeAbstractValueImpl(
840
840
);
841
841
}
842
842
843
-
if(runtimeTypeName==null){
843
+
if(possibleRuntimeTypeName==null){
844
844
thrownewGraphQLError(
845
845
`Abstract type "${abstractType.name}" must resolve to an Object type or an intermediate Interface type at runtime for field "${info.parentType.name}.${info.fieldName}". Either the "${abstractType.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`,
846
846
{nodes: fieldNodes},
@@ -849,61 +849,65 @@ function completeAbstractValueImpl(
849
849
850
850
// releases before 16.0.0 supported returning `GraphQLObjectType` from `resolveType`
851
851
// TODO: remove in 17.0.0 release
852
-
if(isObjectType(runtimeTypeName)){
852
+
if(isObjectType(possibleRuntimeTypeName)){
853
853
thrownewGraphQLError(
854
854
'Support for returning GraphQLObjectType from resolveType was removed in [email protected] please return type name instead.',
855
855
);
856
856
}
857
857
858
-
if(typeofruntimeTypeName!=='string'){
858
+
if(typeofpossibleRuntimeTypeName!=='string'){
859
859
thrownewGraphQLError(
860
860
`Abstract type "${abstractType.name}" must resolve to an Object type or an intermediate Interface type at runtime for field "${info.parentType.name}.${info.fieldName}" with `+
861
-
`value ${inspect(result)}, received "${inspect(runtimeTypeName)}".`,
0 commit comments