(fix)O3-4646 : Fetch all backend modules when pagination is required #1499
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.
Requirements
feat,fix, orchore, among others). See existing PR titles for inspiration.If applicable
Summary
This PR fixes a pagination issue in the backend module fetching mechanism. Previously, the
fetchInstalledBackendModules()andfetchAllBackendModules()functions only retrieved the first page of results (50 modules by default), missing any additional modules when pagination was present.The fix implements proper pagination handling by:
data.nextfield in API responses to fetch subsequent pagesChanges Made:
packages/shell/esm-app-shell/src/optionaldeps.ts: UpdatedfetchAllBackendModules()to fetch all paginated results for optional backend dependenciespackages/apps/esm-implementer-tools-app/src/backend-dependencies/openmrs-backend-dependencies.ts: UpdatedfetchInstalledBackendModules()to fetch all paginated results for dependency checkingTechnical Details:
nextfield pointing to the next pagenextis null or the safety limit is reachedScreenshots
N/A - This is a backend logic fix with no UI changes.
Related Issue
Others