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_sizeto 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_numberoptional 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_sizespecified
KJ - prefer 1&2, 3 could mean getting in the habit of not paging, having slow queries + big results pages?
Would there be much of a downside to mandating a
pageNumberquery parameter for paged queries? So the caller definitely knows it's paged then? I know from the sounds of it other APIs just default it, and the biggest positive change is carefully considering which endpoints should be paged, but this seems almost free/easy-ish?