From 68bd96a65cd6e2b8531360569a47aa702a4d9853 Mon Sep 17 00:00:00 2001 From: Scroogey-SN Date: Tue, 26 Aug 2025 14:40:28 +0000 Subject: [PATCH] pass limit in nextCursorEncoded() (#2434) * pass limit in nextCursorEncoded() * Also fix cursor in query for related items --------- Co-authored-by: ekzyis --- api/resolvers/item.js | 2 +- api/resolvers/search.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/resolvers/item.js b/api/resolvers/item.js index 6ba0bbc6..54673d7c 100644 --- a/api/resolvers/item.js +++ b/api/resolvers/item.js @@ -583,7 +583,7 @@ export default { break } return { - cursor: items.length === limit ? nextCursorEncoded(decodedCursor) : null, + cursor: items.length === limit ? nextCursorEncoded(decodedCursor, limit) : null, items, pins, ad diff --git a/api/resolvers/search.js b/api/resolvers/search.js index 26f79a1d..a042a9f6 100644 --- a/api/resolvers/search.js +++ b/api/resolvers/search.js @@ -168,7 +168,7 @@ export default { }) return { - cursor: items.length === (limit || LIMIT) ? nextCursorEncoded(decodedCursor) : null, + cursor: items.length === limit ? nextCursorEncoded(decodedCursor, limit) : null, items } },