Closed ymc9 closed 1 year ago
Also, today react-hooks plugin doesn't generate a count
hooks, otherwise it can serve as a workaround for getting totals.
Related discussion from discord:
SWR and Tanstack-Query plugins now generate useInfiniteFindManyXXX
hooks.
Pagination can be done using Prisma client but it has one drawback: you can't get the total count in the same call with fetching a page.
https://github.com/prisma/prisma/issues/7550
ZenStack can probably makes some improvements here, say by adding a
paginate
API at the open-api level and corresponding client code generation for react-hooks and trpc-router.