Skip to content

Commit be0d70c

Browse files
committed
Fix flowtype errors
1 parent 08b6a3d commit be0d70c

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

src/definition.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export type CursorDataType = {
4545

4646
export type GraphQLConnectionType = {
4747
count: number,
48-
edges: [GraphQLConnectionEdgeType],
48+
edges: [GraphQLConnectionEdgeType] | [],
4949
pageInfo: PageInfoType,
5050
}
5151

src/resolvers/connectionResolver.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ export function prepareConnectionResolver(
9797
findManyParams.args.sort = sortOptions.sortValue;
9898

9999
if (projection && projection.edges) {
100+
// $FlowFixMe
100101
findManyParams.projection = projection.edges.node || {};
101102
} else {
102103
findManyParams.projection = {};

src/types/cursorType.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const GraphQLConnectionCursor = new GraphQLScalarType({
1010
serialize: String,
1111
parseValue: String,
1212
parseLiteral(ast) {
13+
// $FlowFixMe
1314
return ast.kind === Kind.STRING ? ast.value : null;
1415
},
1516
});

0 commit comments

Comments
 (0)