@@ -844,17 +844,17 @@ function resolveType(
844844) : GraphQLObjectType | Promise < GraphQLObjectType > {
845845 const resolveTypeFn = abstractType . resolveType ?? exeContext . typeResolver ;
846846 const contextValue = exeContext . contextValue ;
847- const possibleRuntimeType = resolveTypeFn (
847+ const possibleRuntimeTypeName = resolveTypeFn (
848848 result ,
849849 contextValue ,
850850 info ,
851851 abstractType ,
852852 ) ;
853853
854- if ( isPromise ( possibleRuntimeType ) ) {
855- return possibleRuntimeType . then ( ( resolvedPossibleRuntimeType ) =>
856- ensureValidRuntimeType (
857- resolvedPossibleRuntimeType ,
854+ if ( isPromise ( possibleRuntimeTypeName ) ) {
855+ return possibleRuntimeTypeName . then ( ( resolvedPossibleRuntimeTypeName ) =>
856+ deriveRuntimeType (
857+ resolvedPossibleRuntimeTypeName ,
858858 exeContext ,
859859 returnType ,
860860 abstractType ,
@@ -865,8 +865,8 @@ function resolveType(
865865 ) ,
866866 ) ;
867867 }
868- return ensureValidRuntimeType (
869- possibleRuntimeType ,
868+ return deriveRuntimeType (
869+ possibleRuntimeTypeName ,
870870 exeContext ,
871871 returnType ,
872872 abstractType ,
@@ -877,7 +877,7 @@ function resolveType(
877877 ) ;
878878}
879879
880- function ensureValidRuntimeType (
880+ function deriveRuntimeType (
881881 runtimeTypeName : unknown ,
882882 exeContext : ExecutionContext ,
883883 returnType : GraphQLAbstractType ,
0 commit comments