zidZ
Convex Community2y ago
7 replies
zid

The InvalidCursor error happens if the query's index range changes between requests

Wanting to confirm something. The InvalidCursor error ( InvalidCursor: Tried to run a query starting from a cursor, but it looks like this cursor is from a different query.) happens if the query's index range changes between requests, and thus it is not possible/viable to setup multiple query definitions/statements if (x) query.withIndex(by_1), else if(y) withIndex(by_2) inside a single query function? Is the best/only way then to separate each query into its own query function?
Was this page helpful?