ezalorsaraE
tRPC3y ago
3 replies
ezalorsara

pagination - Offset Method

Hi trpc has pagination example but only using cursor https://trpc.io/docs/reactjs/useinfinitequery

Is there an example there that use offset pagination
https://www.prisma.io/docs/concepts/components/prisma-client/pagination

Or is it not supported by trpc useInfiniteQuery.

Thank you
- Your procedure needs to accept a cursor input of any type (string, number, etc) to expose this hook.
useInfiniteQuery | tRPC
Prisma
Prisma Client supports both offset pagination and cursor-based pagination. Learn more about the pros and cons of different pagination approaches and how to implement them.
Pagination (Reference)
Was this page helpful?