Billzabob
CCConvex Community
•Created by Billzabob on 5/16/2025 in #support-community
Paginating Stream Not Working with "Join"
I'm paginating through a convex-helpers stream which I'm using to do a "join" and getting strange behavior where the stream ends early.
I'm trying to join both the
userWants
and userHaves
table on their userId
and paginate through the results.
Here is my query:
And here is the relavant part of the schema:
I'm testing with 3 entries in each table all with the same userId
.
If I use collect()
I get the expected count of 3 x 3 = 9.
If I use paginate()
with an initialNumItems
of 9 or more, it works and loads them all.
If initialNumItems
is 1 and I keep calling loadMore(1)
it incorrectly terminates the stream after 3 items.
If initialNumItems
is 4 and I keep calling loadMore(1)
it incorrectly terminates the stream after 6 items.
So something with the cursor gets confused at multiples of the flatMap size.2 replies