keystonejs/keystone-classic

Deprecate List.prototype.paginate

Open

#4126 aperta il 20 mar 2017

Vedi su GitHub
 (2 commenti) (2 reazioni) (0 assegnatari)JavaScript (2288 fork)batch import
help wanted

Metriche repository

Star
 (14.656 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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.

Guida contributor