Skip to content

Commit 136630f

Browse files
committed
Minor touch ups after #342
1 parent 8514211 commit 136630f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/execution/execute.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -818,18 +818,17 @@ function completeAbstractValue(
818818
defaultResolveTypeFn(result, exeContext.contextValue, info, returnType);
819819

820820
invariant(
821-
!isNullish(runtimeType),
821+
!runtimeType,
822822
`Could not determine runtime type of value "${result}" for field ${
823823
info.parentType}.${info.fieldName}.`
824824
);
825825
invariant(
826826
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}".`
829829
);
830830

831-
const schema = exeContext.schema;
832-
if (!schema.isPossibleType(returnType, runtimeType)) {
831+
if (!exeContext.schema.isPossibleType(returnType, runtimeType)) {
833832
throw new GraphQLError(
834833
`Runtime Object type "${runtimeType}" is not a possible type ` +
835834
`for "${returnType}".`,

0 commit comments

Comments
 (0)