File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -818,18 +818,17 @@ function completeAbstractValue(
818
818
defaultResolveTypeFn ( result , exeContext . contextValue , info , returnType ) ;
819
819
820
820
invariant (
821
- ! isNullish ( runtimeType ) ,
821
+ ! runtimeType ,
822
822
`Could not determine runtime type of value "${ result } " for field ${
823
823
info . parentType } .${ info . fieldName } .`
824
824
) ;
825
825
invariant (
826
826
runtimeType instanceof GraphQLObjectType ,
827
- `resolveType must return an instance of GraphQLObjectType for field ${
828
- info . parentType } .${ info . fieldName } , received "${ runtimeType } ".`
827
+ `${ returnType } . resolveType must return an instance of GraphQLObjectType ` +
828
+ `for field ${ info . parentType } .${ info . fieldName } , received "${ runtimeType } ".`
829
829
) ;
830
830
831
- const schema = exeContext . schema ;
832
- if ( ! schema . isPossibleType ( returnType , runtimeType ) ) {
831
+ if ( ! exeContext . schema . isPossibleType ( returnType , runtimeType ) ) {
833
832
throw new GraphQLError (
834
833
`Runtime Object type "${ runtimeType } " is not a possible type ` +
835
834
`for "${ returnType } ".` ,
You can’t perform that action at this time.
0 commit comments