Pagination
Here, we'll learn how to fetch only chunks (pages) of data from the database instead of all of the data available.
export class PaginationDto {
@IsOptional()
@IsInt()
@IsPositive()
readonly limit: number;
@IsOptional()
@IsInt()
@IsPositive()
readonly offset: number;
}export const DefaultPageSize = {
USERS: 10,
} as const satisfies Record<string, number>;@Query() paginationDto: PaginationDtoLast updated