Hello, this is a solution which I happened to think of while trying to optimize a couple of resource intensive queries. It allows someone to control where exactly in the pipeline should the pagination (skip and limit) should run while preserving the existing behavior of the plugin (Attached below is a test output). Further I believe this addresses the issues #57 and #48.
Hello, this is a solution which I happened to think of while trying to optimize a couple of resource intensive queries. It allows someone to control where exactly in the pipeline should the pagination (skip and limit) should run while preserving the existing behavior of the plugin (Attached below is a test output). Further I believe this addresses the issues #57 and #48.
Please do let me know your thoughts on this if you do find the time. I also added in the type definitions from the https://www.npmjs.com/package/@types/mongoose-aggregate-paginate-v2 package directly into this so that it becomes easier to maintain.