@@ -28,7 +28,7 @@ import {
2828} from '../type/definition' ;
2929import { GraphQLList , GraphQLNonNull } from '../type/wrappers' ;
3030import type {
31- GraphQLType ,
31+ GraphQLOutputType ,
3232 GraphQLLeafType ,
3333 GraphQLAbstractType ,
3434 GraphQLField ,
@@ -799,7 +799,7 @@ function asErrorInstance(error: mixed): Error {
799799// in the execution context.
800800function completeValueCatchingError(
801801 exeContext: ExecutionContext,
802- returnType: GraphQLType ,
802+ returnType: GraphQLOutputType ,
803803 fieldNodes: $ReadOnlyArray< FieldNode > ,
804804 info: GraphQLResolveInfo,
805805 path: ResponsePath,
@@ -853,7 +853,7 @@ function completeValueCatchingError(
853853// location information.
854854function completeValueWithLocatedError(
855855 exeContext: ExecutionContext,
856- returnType: GraphQLType ,
856+ returnType: GraphQLOutputType ,
857857 fieldNodes: $ReadOnlyArray< FieldNode > ,
858858 info: GraphQLResolveInfo,
859859 path: ResponsePath,
@@ -913,7 +913,7 @@ function completeValueWithLocatedError(
913913 */
914914function completeValue (
915915 exeContext : ExecutionContext ,
916- returnType : GraphQLType ,
916+ returnType : GraphQLOutputType ,
917917 fieldNodes : $ReadOnlyArray < FieldNode > ,
918918 info: GraphQLResolveInfo,
919919 path: ResponsePath,
@@ -1003,7 +1003,9 @@ function completeValue(
10031003
10041004 // Not reachable. All possible output types have been considered.
10051005 throw new Error (
1006- `Cannot complete value of unexpected type "${ String ( returnType ) } ".` ,
1006+ `Cannot complete value of unexpected type "${ String (
1007+ ( returnType : empty ) ,
1008+ ) } ".`,
10071009 ) ;
10081010}
10091011
0 commit comments