Skip to content

Commit b390687

Browse files
committed
If first or last args not provided, then get first 20 records by default.
1 parent f0da080 commit b390687

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/resolvers/connectionResolver.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export function prepareConnectionResolver(
127127
first = parseInt(first, 10) || 0;
128128
}
129129

130-
const limit = last || first;
130+
const limit = last || first || 20;
131131
const skip = last > 0 ? first - last : 0;
132132

133133
findManyParams.args.limit = limit + 1; // +1 document, to check next page presence

0 commit comments

Comments
 (0)