How to implement pagination in NestJS with TypeORM
You can find some nice example in this project. In short typeorm has a really nice method specific to this usecase findAndCount. async findAll(query): Promise<Paginate> { const take = query.take || 10 const skip = query.skip || 0 const keyword = query.keyword || ” const [result, total] = await this.userRepository.findAndCount( { where: { name: Like(‘%’ … Read more