Skip to content

Commit 023300d

Browse files
committed
fix flow errors
1 parent 878c066 commit 023300d

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/execution/execute.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,6 +1063,8 @@ function completeListValue(
10631063
exeContext.schema.__experimentalStream &&
10641064
stream &&
10651065
stream.if !== false &&
1066+
typeof stream.label === 'string' &&
1067+
typeof stream.initial_count === 'number' &&
10661068
index >= stream.initial_count
10671069
) {
10681070
const patchErrors = [];

src/type/dispatcher.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import { $$asyncIterator } from 'iterall';
44

5-
import { type ObjMap } from '../jsutils/ObjMap';
65
import { type Path, pathToArray } from '../jsutils/Path';
76
import { type PromiseOrValue } from '../jsutils/PromiseOrValue';
87
import isPromise from '../jsutils/isPromise';
@@ -16,10 +15,7 @@ export class Dispatcher {
1615
this._patches = [];
1716
}
1817

19-
execute(
20-
fn: () => PromiseOrValue<ObjMap<mixed>>,
21-
errors: Array<GraphQLError>,
22-
) {
18+
execute(fn: () => PromiseOrValue<mixed>, errors: Array<GraphQLError>) {
2319
try {
2420
return fn();
2521
} catch (error) {
@@ -31,7 +27,7 @@ export class Dispatcher {
3127
add(
3228
label: string,
3329
path: Path | void,
34-
fn: () => PromiseOrValue<ObjMap<mixed>>,
30+
fn: () => PromiseOrValue<mixed>,
3531
errors: Array<GraphQLError>,
3632
) {
3733
this._patches.push(
@@ -99,7 +95,7 @@ export class Dispatcher {
9995

10096
export type ExecutionPatchResult = {
10197
errors?: $ReadOnlyArray<GraphQLError>,
102-
data?: ObjMap<mixed> | null,
98+
data?: mixed | null,
10399
path: $ReadOnlyArray<string | number>,
104100
label: string,
105101
...

0 commit comments

Comments
 (0)