Allow querying recent boards in a group or project
What does this MR do and why?
Related to #300985 (closed)
To replace existing requests for recent boards in app/assets/javascripts/boards/components/boards_selector.vue
we need to add the ability to query them with GraphQL for groups and projects.
This MR adds a new field recent_issue_boards
to Types::GroupType
and Types::ProjectType
that lists the recently visited boards for a user in the group/project.
This list replicates the length and sorting of the existing endpoints groups/*group_id/-/boards/recent
and /*namespace_id/:project_id/-/boards/recent
, that is, the most recent first and a maximum of 4 boards.
Queries
query recentGroupBoards {
group(fullPath: "gitlab-org") {
recentIssueBoards {
edges {
node {
name
}
}
}
}
}
query recentProjectBoards {
project(fullPath: "gitlab-org/gitlab-shell") {
recentIssueBoards {
edges {
node {
name
}
}
}
}
}
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.