-
Notifications
You must be signed in to change notification settings - Fork 13
[core] Add dynamic GraphQL query pagination method #156
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
Draft
faiqamin
wants to merge
10
commits into
release/beta
Choose a base branch
from
feature/JSS-5309-standardized-calls-pagination
base: release/beta
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[core] Add dynamic GraphQL query pagination method #156
faiqamin
wants to merge
10
commits into
release/beta
from
feature/JSS-5309-standardized-calls-pagination
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Introduced `paginateAll` function for handling cursor-based pagination. - Added `PaginationOptions`, `PaginatedResponse`, and `PaginationArgs` interfaces. - Created unit tests for `paginateAll` to ensure correct functionality and error handling. - Updated index file to export new pagination utilities.
- Added `keytar` as a dependency in `package.json`. - Updated the structure of the `manyLocale` response in the GraphQL queries to include `results`, `cursor`, and `hasMore` fields. - Refactored `getAllLocales` method to utilize the new response structure. - Introduced pagination utilities for fetching all locales and taxonomies with nested pagination support. - Enhanced tests to validate the new pagination functionality and response structure.
- Deleted the demo script for the pagination utility, which included examples and setup instructions. - Removed the follow-up plan document outlining the implementation status and next steps for pagination. - Eliminated the technical analysis of pagination strategy, which detailed design rationale and current state analysis. - Cleared out the README and usage guide for the pagination utility, which provided an overview and usage patterns. - Removed nested pagination analysis and examples, which demonstrated handling nested pagination scenarios. - Consolidated documentation into a new comprehensive guide for dynamic pagination, ensuring all relevant information is up-to-date and accessible.
- Deleted the dynamic pagination guide, pagination examples, and implementation summary documents. - Consolidated and updated the remaining documentation to ensure clarity and relevance. - Streamlined the pagination utility documentation for better accessibility and usability.
- Removed outdated pagination utilities and tests, transitioning to a dynamic pagination approach. - Updated `ContentClient` methods to utilize `executeDynamicPagination` and `simpleDynamicPagination` for fetching locales and taxonomies. - Enhanced documentation to reflect the new pagination strategy and its usage. - Added tests for dynamic pagination scenarios, including handling empty results and nested pagination. - Updated index file to export new dynamic pagination utilities.
- Transitioned to a fully dynamic pagination approach, removing outdated utilities and consolidating functionality into a single `dynamicPagination` method. - Updated `ContentClient` methods to utilize the new dynamic pagination capabilities, enhancing the fetching of locales and taxonomies. - Improved documentation to reflect the new pagination strategy, including comprehensive guides and usage examples. - Added tests to validate the dynamic pagination functionality, covering various scenarios including multiple paginated fields and error handling. - Streamlined the codebase by removing legacy pagination methods and ensuring all references are up-to-date.
- Deleted the test file for the pagination utility, which included various test cases for the `paginateAll` function. - This removal aligns with the transition to a dynamic pagination approach, ensuring the codebase remains clean and relevant.
- Replaced instances of `getNestedValue` with `getValueByPath` for improved clarity in the dynamic pagination implementation. - Updated the index file to reflect changes in exported utility names, ensuring consistency across the codebase.
- Removed the `keytar` dependency from `package.json` and `package-lock.json`. - Updated `package-lock.json` to reflect the removal of unnecessary dependencies and ensure consistency with the current project structure.
- Introduced a new stateless pagination utility for handling dynamic many GraphQL calls, simplifying the pagination process. - Removed the outdated dynamic pagination implementation and associated tests, streamlining the codebase. - Updated the ContentClient to utilize the new stateless pagination method, enhancing the fetching of paginated data. - Improved documentation to reflect the new pagination strategy, including comprehensive guides and usage examples. - Added tests to validate the new pagination functionality, covering various scenarios including error handling and type safety.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PLEASE DO NOT MERGE. CREATED THIS TO TEST AND SEE CHANGES AS A WHOLE