Allow fetching related merge requests on a WorkItem
What does this MR do and why?
New development widget on work items GraphQL API allows fetching merge requests related to the work item
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
How to set up and validate locally
- You can use the close pattern in a merge request to mention an issue.
Resolves #2
for example. This will create a record in the DB we are trying to fetch. You can mention the same issue in multiple MRs to create more associated records. - Then, use the following query to fetch associated merge requests for the mentioned issue
{ namespace(fullPath: "flightjs/flight") { workItem(iid: "<mentioned_issue_iid>") { widgets { type ... on WorkItemWidgetDevelopment { relatedMergeRequests { nodes { closesWorkItem mergeRequest { id } } } } } } } }
Related to #454137 (closed)
Edited by Mario Celi