@@ -28,7 +28,7 @@ import {
28
28
} from '../type/definition' ;
29
29
import { GraphQLList , GraphQLNonNull } from '../type/wrappers' ;
30
30
import type {
31
- GraphQLType ,
31
+ GraphQLOutputType ,
32
32
GraphQLLeafType ,
33
33
GraphQLAbstractType ,
34
34
GraphQLField ,
@@ -799,7 +799,7 @@ function asErrorInstance(error: mixed): Error {
799
799
// in the execution context.
800
800
function completeValueCatchingError(
801
801
exeContext: ExecutionContext,
802
- returnType: GraphQLType ,
802
+ returnType: GraphQLOutputType ,
803
803
fieldNodes: $ReadOnlyArray< FieldNode > ,
804
804
info: GraphQLResolveInfo,
805
805
path: ResponsePath,
@@ -853,7 +853,7 @@ function completeValueCatchingError(
853
853
// location information.
854
854
function completeValueWithLocatedError(
855
855
exeContext: ExecutionContext,
856
- returnType: GraphQLType ,
856
+ returnType: GraphQLOutputType ,
857
857
fieldNodes: $ReadOnlyArray< FieldNode > ,
858
858
info: GraphQLResolveInfo,
859
859
path: ResponsePath,
@@ -913,7 +913,7 @@ function completeValueWithLocatedError(
913
913
*/
914
914
function completeValue (
915
915
exeContext : ExecutionContext ,
916
- returnType : GraphQLType ,
916
+ returnType : GraphQLOutputType ,
917
917
fieldNodes : $ReadOnlyArray < FieldNode > ,
918
918
info: GraphQLResolveInfo,
919
919
path: ResponsePath,
@@ -1003,7 +1003,9 @@ function completeValue(
1003
1003
1004
1004
// Not reachable. All possible output types have been considered.
1005
1005
throw new Error (
1006
- `Cannot complete value of unexpected type "${ String ( returnType ) } ".` ,
1006
+ `Cannot complete value of unexpected type "${ String (
1007
+ ( returnType : empty ) ,
1008
+ ) } ".`,
1007
1009
) ;
1008
1010
}
1009
1011
0 commit comments