keystonejs/keystone-classic

Deprecate List.prototype.paginate

Open

#4126 opened on Mar 20, 2017

View on GitHub
 (2 comments) (2 reactions) (0 assignees)JavaScript (14,656 stars) (2,288 forks)batch import
help wanted

Description

Basically, this is too opinionated and fragile for us to continue supporting.

It used to work well with mongoose 3 and callback patterns but with promises now more popular thanks to async/await, and issues where the find() and count() queries may get out of sync with .where() / etc chaining, I think the best option is to deprecate the whole thing and let users deal with it however is most appropriate for their specific use-case.

Let's add a deprecation warning on first use to Keystone 4, and remove in the next major.

Contributor guide