@@ -840,17 +840,17 @@ function resolveType(
840840) : GraphQLObjectType | Promise < GraphQLObjectType > {
841841 const resolveTypeFn = abstractType . resolveType ?? exeContext . typeResolver ;
842842 const contextValue = exeContext . contextValue ;
843- const possibleRuntimeType = resolveTypeFn (
843+ const possibleRuntimeTypeName = resolveTypeFn (
844844 result ,
845845 contextValue ,
846846 info ,
847847 abstractType ,
848848 ) ;
849849
850- if ( isPromise ( possibleRuntimeType ) ) {
851- return possibleRuntimeType . then ( ( resolvedPossibleRuntimeType ) =>
852- ensureValidRuntimeType (
853- resolvedPossibleRuntimeType ,
850+ if ( isPromise ( possibleRuntimeTypeName ) ) {
851+ return possibleRuntimeTypeName . then ( ( resolvedPossibleRuntimeTypeName ) =>
852+ deriveRuntimeType (
853+ resolvedPossibleRuntimeTypeName ,
854854 exeContext ,
855855 returnType ,
856856 abstractType ,
@@ -861,8 +861,8 @@ function resolveType(
861861 ) ,
862862 ) ;
863863 }
864- return ensureValidRuntimeType (
865- possibleRuntimeType ,
864+ return deriveRuntimeType (
865+ possibleRuntimeTypeName ,
866866 exeContext ,
867867 returnType ,
868868 abstractType ,
@@ -873,7 +873,7 @@ function resolveType(
873873 ) ;
874874}
875875
876- function ensureValidRuntimeType (
876+ function deriveRuntimeType (
877877 runtimeTypeName : unknown ,
878878 exeContext : ExecutionContext ,
879879 returnType : GraphQLAbstractType ,
0 commit comments