problems
- easy to forget default limit is there - get dropdowns with just a few options, etc
- have to specify arbitrary-ish big number for
page_size
to remove limit. how to choose?
benefits
- not having to remember to implement paging
- query performance by default
possible solutions
- don't used
PagedView<>
for lookups or queries where consumer probably won't want paging - don't make
page_number
optional for queries with paging: throw error if missing. can't mistake that it's a paged view then - only use paging if
page_number
/page_size
specified
KJ - prefer 1&2, 3 could mean getting in the habit of not paging, having slow queries + big results pages?
Yes I think that is reasonable, that in combination with the
pageSize
max limit should enforce good responsible usage of paged endpoints.