Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement fetchAllMiddleware to handle per_page=-1 through pagination #10762

Merged
merged 21 commits into from
Oct 21, 2018

Commits on Oct 21, 2018

  1. Implement fetchAllMiddleware to handle per_page=-1 through pagination

    Introduce a new middleware function to iterate through all available pages
    for a large collection, replacing any encountered `per_page=-1` requests
    with a series of sequential requests which are assembled into a final
    merged array of all available results.
    kadamwhite authored and youknowriad committed Oct 21, 2018
    Configuration menu
    Copy the full SHA
    e24f311 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a3f3517 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0b13284 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c54aa57 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ed69cb5 View commit details
    Browse the repository at this point in the history
  6. Improve fetchAllMiddleware: use links for pagination.

    - Remove unneeded modification to apiFetch parsing logic.
    - Utilize the links header to traverse collection pages.
    - Remove confusing try/catch behavior.
    - Add more escape hatches for cases where middleware should not apply.
    kadamwhite authored and youknowriad committed Oct 21, 2018
    Configuration menu
    Copy the full SHA
    49d80cd View commit details
    Browse the repository at this point in the history
  7. Remove leftover debugging comment

    kadamwhite authored and youknowriad committed Oct 21, 2018
    Configuration menu
    Copy the full SHA
    c615efd View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    d122d87 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    e11f34c View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    7703ce2 View commit details
    Browse the repository at this point in the history
  11. Fix unit tests

    youknowriad committed Oct 21, 2018
    Configuration menu
    Copy the full SHA
    c2c2f6c View commit details
    Browse the repository at this point in the history
  12. Avoid circular dependency

    youknowriad committed Oct 21, 2018
    Configuration menu
    Copy the full SHA
    158f088 View commit details
    Browse the repository at this point in the history
  13. Adding some unit tests

    youknowriad committed Oct 21, 2018
    Configuration menu
    Copy the full SHA
    5c7a2f2 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    b7bb2cd View commit details
    Browse the repository at this point in the history
  15. Update the lock file

    youknowriad committed Oct 21, 2018
    Configuration menu
    Copy the full SHA
    5436e18 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    8803b88 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    0a08388 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    1ce1f2b View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    93eeecc View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    08e8ca8 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    562250d View commit details
    Browse the repository at this point in the history