-
-
Notifications
You must be signed in to change notification settings - Fork 968
Closed
Labels
Description
What problem are you trying to solve?
Clear up any misunderstanding in the pagination API, specifically the difference between pagination
and pagination.all
.
Describe the feature
Remaning pagination
to pagination.each
. The two methods will then reflect their mode of operation:
.all
: fetches all results from the API, recursively paginating if necessary. Returns a promise which resolves to the full list of results..each
: returns an async iterator, which allows you to iterate over the results usingfor await
syntax. Similar in concept to streaming, used when you expect more results than can feasibly fit in memory at once.
Note this is simply a proposal to change nomenclature - the actual features remain the same.
Related discussion: #1052 (comment)
Checklist
- I have read the documentation and made sure this feature doesn't already exist.
szmarczakPopGoesTheWza