If you do not do any skip() you will always fetch the first page and never access the next page.
And items.length will never be bigger than page_limit because you limit the number of documents to page_limit so items.length will always be equal to page_limit except for the last page. The items.length will be smaller than page_limit.
Hi @muhammed_ogunsanya
Pagination was always done with two requests. one to get the total and the other to get the actual documents (using skip and limit )
With aggregation you can do pagination with one pipeline using $group (the old way) or $facet