LPGameDevs / EditarrrPublic

Public repo for level editor tools in Unity
MIT License
11 stars 2 forks source link

Backend: Pagination for Get All Levels Query #144

Closed HaywardMorihara closed 1 year ago

HaywardMorihara commented 1 year ago

Pagination is cursor-based (rather than offset) because that's what DynamDB supports out-of-the-box (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Query.Pagination.html).

The UI this would most naturally support would involve hitting the limit, then showing a "Load More" button (or something like that), then fetching the next page of results.

For flexibility, I've also added a "page limit" query param so the client can fetch more than 10 levels in a single page.