I haven't tried this personally, thought maybe I c...
# orm-help
a
I haven't tried this personally, thought maybe I could get a quick answer here. Does findMany return the total number of records for a query? Asking for pagination.
t
Hi @Aaron Fulkerson , you can use prisma count function. Something like this prisma.user.count();
👍 1
r
something to keep in mind RE pagination; if you're going cursor pagination then when going "forward" use
first
and
after
and you should get (
first: 4, after 'd'
):
['e','f','g','h']
When going backwards use
last
and
before
and then you should get the same (
last: 4, before:'i'
):
['e','f','g','h']
if you use
before
and
first
(
first: 4, before: 'i'
) then you'll end up with
['a,'b','c','d']
.. not what you're looking for..