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?
1+2 make sense. The only issue I can see but it is a very edge case and can't think of where I've had to do it (something to do with SST user dropdown possibly) is where there are cases for a paged view and a non paged view. This would need a second endpoint. Not a huge issue since its usually a workaround for something and not done regularly