Skip to content

Commit 9239253

Browse files
authored
Pass lint & flow
1 parent c53efbe commit 9239253

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/execution/execute.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -946,15 +946,15 @@ function completeAbstractValue(
946946

947947
if (isThenable(runtimeType)) {
948948
// Cast to Promise
949-
const runtimeTypePromise: Promise<GraphQLObjectType | string> =
949+
const runtimeTypePromise: Promise<?GraphQLObjectType | string> =
950950
(runtimeType: any);
951951
return runtimeTypePromise.then(resolvedRuntimeType =>
952952
completeObjectValue(
953953
exeContext,
954954
ensureValidRuntimeType(
955955
resolvedRuntimeType,
956-
exeContext,
957-
returnType,
956+
exeContext,
957+
returnType,
958958
fieldNodes,
959959
info,
960960
result
@@ -970,9 +970,9 @@ function completeAbstractValue(
970970
return completeObjectValue(
971971
exeContext,
972972
ensureValidRuntimeType(
973-
resolvedRuntimeType,
973+
((runtimeType: any): ?GraphQLObjectType | string),
974974
exeContext,
975-
returnType,
975+
returnType,
976976
fieldNodes,
977977
info,
978978
result
@@ -985,15 +985,15 @@ function completeAbstractValue(
985985
}
986986

987987
function ensureValidRuntimeType(
988-
runtimeTypeOrName: string | GraphQLObjectType | void,
988+
runtimeTypeOrName: ?GraphQLObjectType | string,
989989
exeContext: ExecutionContext,
990990
returnType: GraphQLAbstractType,
991991
fieldNodes: Array<FieldNode>,
992992
info: GraphQLResolveInfo,
993993
result: mixed
994994
): GraphQLObjectType {
995-
const runtimeType = typeof runtimeTypeOrName === 'string' ?
996-
exeContext.schema.getType(runtimeTypeOrName) :
995+
const runtimeType = typeof runtimeTypeOrName === 'string' ?
996+
exeContext.schema.getType(runtimeTypeOrName) :
997997
runtimeTypeOrName;
998998

999999
if (!(runtimeType instanceof GraphQLObjectType)) {

0 commit comments

Comments
 (0)