Set cursor totalItemsMode to exclude with explanatory comment
Cursor requests already carry the computed totalItems from page 1, so the count query is skipped regardless of this value. Setting it to 'exclude' reflects what actually happens, and the comment explains why the value doesn't matter. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -870,7 +870,9 @@ function parseCursorFromRequest(
|
||||
if (isQueryEntitiesCursorRequest(request)) {
|
||||
return {
|
||||
...request.cursor,
|
||||
totalItemsMode: 'include',
|
||||
// Doesn't matter — cursor already carries the computed totalItems
|
||||
// number from the first page, so the count query is skipped regardless.
|
||||
totalItemsMode: 'exclude',
|
||||
};
|
||||
}
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user