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

feat: add pageSize option #456

Merged
merged 2 commits into from Oct 4, 2021
Merged

feat: add pageSize option #456

merged 2 commits into from Oct 4, 2021

Conversation

angeloashmore
Copy link
Member

@angeloashmore angeloashmore commented Oct 4, 2021

Package

  • gatsby-source-prismic
  • gatsby-plugin-prismic-previews

Types of changes

  • Chore (a non-breaking change which is related to package maintenance)
  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Adds a pageSize plugin option to gatsby-source-prismic and gatsby-plugin-prismic-previews which allows setting the pageSize option to @prismicio/client.

This allows a user to reduce API payloads during node sourcing by setting the page size to less than the maximum (100). This may be necessary if the Prismic REST API fails the request due to result that is larger than the maximum payload size.

Checklist:

  • My change requires an update to the official documentation.
  • All TSDoc comments are up-to-date and new ones have been added where necessary.
  • All new and existing tests are passing.

@angeloashmore angeloashmore merged commit 72d6a68 into main Oct 4, 2021
@angeloashmore angeloashmore deleted the aa/page-size branch October 4, 2021 23:23
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.

None yet

1 participant