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

fix: allow "page" param to properly pass through getall methods #370

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

malee31
Copy link

@malee31 malee31 commented Dec 21, 2024

Resolves: #369

Description

The dangerouslyGetAll method (and all getAll* methods utilizing it) now uses the page param passed in as the starting point for its search results instead of only searching from the first page.

This fixes the offset pagination for the client without having to directly create and send out API requests with fetch().

Checklist

No existing tests fail as a result of this change.

  • A comprehensive Linear ticket, providing sufficient context and details to facilitate the review of the PR, is linked to the PR.
  • If my changes require tests, I added them.
  • If my changes affect backward compatibility, it has been discussed.
  • If my changes require an update to the CONTRIBUTING.md guide, I updated it.

How to QA 1

Utilize the snippet of code provided in the original issue on the new client.

Changes have not yet been tested on a real Prismic project. The code was read and traced through line by line.

Footnotes

  1. Please use these labels when submitting a review:
    ❓ #ask: Ask a question.
    💡 #idea: Suggest an idea.
    ⚠️ #issue: Strongly suggest a change.
    🎉 #nice: Share a compliment.

@malee31 malee31 changed the title fix: allow starting page option to properly pass through getall methods fix: allow "page" param to properly pass through getall methods Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant