Add work items field on namespace type
What does this MR do and why?
This MR introduces the workItems field on the namespace type. This will allow the frontend to query for work items without needing to distinguish between the Group.workItems and Project.workItems APIs.
References
Screenshots or screen recordings
| Project namespace | Group namespace |
|---|---|
![]() |
![]() |
How to set up and validate locally
- Write a query to fetch work items for a given namespace. e.g:
query q {
namespace(fullPath: "flightjs") {
workItems {
nodes {
id
}
}
}
}
- Observe that work items are returned for a project or a group namespace, and the appropriate filters work.
- Observe that work items are not returned when called on a project namespace
- Note that certain arguments apply only to group namespaces. The descriptions of these fields have been appended with "Ignored for project namespaces." to indicate this. These fields can be tested as follows:
- Write a query to fetch work items for a project namespace, and a group-only argument applied. e.g:
query q {
namespace(fullPath: "flightjs/flight") {
workItems(timeframe: { start: "2025-01-01", end: "2025-01-02" }) {
nodes {
id
}
}
}
}
- Observe that the description of this argument indicates that it will only apply for non-project namespaces (i.e. by hovering over the argument in GraphiQL)
- Observe that when the query is run on a project namespace, the argument is ignored
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 #537460 (closed)
Edited by Matt D'Angelo

