NestJS Unleashed #19 - Pagination
We have to be careful when fetching all the entities at once, as they may be too numerous. It may be a nice idea to limit this quantity somehow. In this lesson, we'll use offset-based pagination in order to limit the results. It is simpler and well suited here, due to the way we naturally see results in a shop: like a catalog. While doing so, we also learn to have better type safety in the default page sizes object using the satisfies keyword from TypeScript. With it, this object is only allowed numeric fields. The topic of pagination, alongside filtering and sorting, will be better explored in the Extra module 5 - Advanced Querying. Full Course - https://www.udemy.com/course/nestjs-unleashed Complementary Material - https://kinesis-school-of-programming.gitbook.io/nestjs-unleashed/ Code Repository - https://github.com/DanielMaranhao/conrod-backend
We have to be careful when fetching all the entities at once, as they may be too numerous. It may be a nice idea to limit this quantity somehow. In this lesson, we'll use offset-based pagination in order to limit the results. It is simpler and well suited here, due to the way we naturally see results in a shop: like a catalog. While doing so, we also learn to have better type safety in the default page sizes object using the satisfies keyword from TypeScript. With it, this object is only allowed numeric fields. The topic of pagination, alongside filtering and sorting, will be better explored in the Extra module 5 - Advanced Querying. Full Course - https://www.udemy.com/course/nestjs-unleashed Complementary Material - https://kinesis-school-of-programming.gitbook.io/nestjs-unleashed/ Code Repository - https://github.com/DanielMaranhao/conrod-backend