Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Develop) Implement Pagination for API #134

Open
banushi-a opened this issue Feb 17, 2025 · 0 comments
Open

(Develop) Implement Pagination for API #134

banushi-a opened this issue Feb 17, 2025 · 0 comments
Assignees

Comments

@banushi-a
Copy link
Contributor

We want to implement pagination in the list / get endpoints for our API, namely the reviews, roles, and companies routers.

I think it would be a good idea to add the pagination inputs into the context of the procedure itself. It would look something like this (definitely not chat gpt):

Image

We can either make a new pagination procedure or implement it into the current public procedure. Whichever you like works, doesn't matter since they are optional and don't have to be used in irrelevant endpoints. Then you can access these in the ctx of each endpoint that requires them. See https://orm.drizzle.team/docs/guides/limit-offset-pagination for how to integrate them into our drizzle queries

Conditions of Satisfaction:

  • Some abstracted pagination logic procedure (new or implement into public procedure)
  • Existing endpoint calls from the frontend don't go up in flames
  • Pagination actually works lol

Let me know if you need help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants