Skip to content

Commit fcbf4e4

Browse files
committed
fix: return non-empty PageInfo if records not found
1 parent fdf0256 commit fcbf4e4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/resolvers/connectionResolver.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,12 @@ export function preparePageInfo(
179179
limit: number,
180180
skip: number
181181
) {
182-
const pageInfo = {};
182+
const pageInfo = {
183+
startCursor: '',
184+
endCursor: '',
185+
hasPreviousPage: false,
186+
hasNextPage: false,
187+
};
183188

184189
const hasExtraRecords = edges.length > limit;
185190

0 commit comments

Comments
 (0)