prisma-examples icon indicating copy to clipboard operation
prisma-examples copied to clipboard

BEST PRACTICES for paginate using Prisma ORM + Advanced types (include, select...)

Open felinto-dev opened this issue 4 years ago • 1 comments

Hello!

I would see examples about how to use Prisma + Pagination.

I already created a topic about it: https://github.com/prisma/prisma/discussions/7770

I checked the examples from this git repository but I didn't found any code related to pagination I am trying to do it but I am facing some issues with TypeScript Types.

felinto-dev avatar Jun 19 '21 20:06 felinto-dev

Hi @felinto-dev 👋🏾

We have included pagination with the backend REST and GraphQL examples. For the REST examples, there's a feed endpoint that accepts take and skip query parameters that specify how many objects should be returned and how many of the returned objects in the list should be skipped, respectively. The GraphQL examples have a feed query that accepts similar arguments as the REST feed endpoint.

In case you run into any issues, don't hesitate to let us know. We would also be happy to get your feedback on how to approach pagination. 🙂

ruheni avatar Jun 22 '21 07:06 ruheni

Hey Felinto 👋🏽

I would refer you to our docs on pagination in the meantime. Feel free to re-open this issue if you have further questions.

ruheni avatar Jan 24 '23 15:01 ruheni