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

setting max page limit for pagination via environment variable #1075

Draft
wants to merge 2 commits into
base: dev-3.0.0
Choose a base branch
from

Conversation

yesoreyeram
Copy link
Collaborator

@yesoreyeram yesoreyeram commented Nov 29, 2024

Fixes #1050

Note: Documentation not added in this PR. ( currently pagination is a undocumented / beta feature )

How to test

Before changes

  • git checkout main && yarn && yarn build && mage -v && docker compose up
  • Visit the explore page and you will see the pokemon api calls with pagination and summarize option set.
  • You should see the results as 10 ( 5 page max and 2 items in each page ). Even though max page is set to 20 in query, it will restrict to 5 as default behaviour.
image

After changes

  • git checkout pagination/max-pages-configuration && yarn && yarn build && mage -v && docker compose up
  • Visit the explore page and you will see the pokemon api calls with pagination and summarize option set.
  • You should see the results as 16 ( 8 page max set via environment variable and 2 items in each page ). Even though max page is set to 20 in query, it will restrict to 8 as the environment variable is set and honoured with new behaviour.
image

@yesoreyeram yesoreyeram marked this pull request as ready for review November 29, 2024 05:25
@yesoreyeram yesoreyeram requested a review from a team as a code owner November 29, 2024 05:25
@yesoreyeram yesoreyeram changed the base branch from main to dev-3.0.0 December 1, 2024 23:22
@yesoreyeram yesoreyeram marked this pull request as draft December 1, 2024 23:28
@yesoreyeram yesoreyeram added this to the Version 3.0 milestone Dec 9, 2024
@yesoreyeram yesoreyeram self-assigned this Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant