feat: add backend pagination to list endpoints (Phase 4.5)#288
Merged
nbhansen merged 1 commit intoaau-giraf:dev-mainfrom Feb 8, 2026
Merged
feat: add backend pagination to list endpoints (Phase 4.5)#288nbhansen merged 1 commit intoaau-giraf:dev-mainfrom
nbhansen merged 1 commit intoaau-giraf:dev-mainfrom
Conversation
- Add PaginatedResponse<T> DTO with Items, TotalCount, Skip, Take - Add PaginationExtensions.ToPaginatedAsync() IQueryable extension - Update 11 list endpoints across 6 controllers with optional skip/take params: AdminController (caregivers, children, admins, pairings), UsersController (users), ArtefactsController (artefacts), BoardsController (boards, boards/list), CategoriesController (categories), RelationController (pairings, caregiver pairings) - Update ArtefactService, BoardService, RelationService interfaces + impls - Default page size: 50, max: 200, backward-compatible - Fix CategoriesControllerTests to deserialize PaginatedResponse - All tests pass: 98/98 VTA.Tests, 25/25 SyncService.Tests
3 tasks
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
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.
Adds optional
skip/takequery parameters to all list endpoints, with a genericPaginatedResponse<T>wrapper.Changes
New files
DTOs/PaginationDTO.cs—PaginatedResponse<T>withItems,TotalCount,Skip,TakeExtensions/PaginationExtensions.cs—ToPaginatedAsync()IQueryable extension (default 50, max 200)Updated controllers (11 endpoints across 6 controllers)
GET caregivers,children,admins,pairingsGET usersGET artefactsGET boards,GET boards/listGET categoriesGET pairings,GET caregiver/{id}Updated services
IArtefactService/ArtefactService—GetArtefactsForUserAsync(skip, take)IBoardService/BoardService—GetBoardsForUserAsync(skip, take),GetBoardListAsync(skip, take)IRelationService/RelationService—GetAllPairingsAsync(skip, take),GetPairingsForCaregiverAsync(skip, take)Backward-compatible
Callers that don't pass
skip/takeget the default page size (50). Existing tests updated to handle new response shape.Tests