Integrate Work Items REST API POC
What does this MR do and why?
Proof of concept to route work item list fetches through the REST API (GET /api/v4/namespaces/:id/-/work_items) instead of GraphQL, scoped to planning_view.vue only.
Gated behind a new frontend feature flag work_item_rest_api_frontend_users (separate from the backend work_item_rest_api flag). When enabled, the two current Apollo queries (workItemsFull + workItemsSlim) are replaced by a single REST-backed query, which should reduce payload size and query complexity.
A new Apollo local resolver intercepts workItems @client in get_work_items_rest.query.graphql. The namespace { id fullPath name } fields are resolved by the GraphQL server as normal; the workItems field is intercepted client-side and fetched from the REST endpoint via axios. The REST response is mapped to the GraphQL WorkItemConnection shape so all existing update() callbacks in planning_view.vue continue to work unchanged. Keyset pagination uses x-next-cursor / x-prev-cursor response headers. This POC is the first step to build off of: gitlab-org#21764
Known limitations (not in scope for this POC):
- ee only filters/widgets/fields (only mapping
workItemsSlimto the new query for now). We still use the full query incombineWorkItemLists, but the new query will eventually replace this as well in a follow up MR - pagination - will handle that in a separate MR next
Screenshots or screen recordings
You should be able to confirm the new REST calls are being made by looking at the Network tab and seeing calls with the appended filters
How to set up and validate locally
- Enable the flags
work_item_rest_api_frontend_usersandwork_item_rest_apiflags - Navigate to the
/work_itemspage for a project or group - Work items should load with expected content, most filters, as well as pagination
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #594636 (closed)
