Add group level work item description diff endpoints
What does this MR do and why?
Adding two new routes to our internal REST API. This are necessary in the new work items API to fetch legacy diffs. In the future they will be replaced in the GQL API. Created &12091 to track that work
How to set up and validate locally
- Go to GraphiQL locally at http://127.0.0.1:3000/-/graphql-explorer
- Enable the feature flag in Rails console
Feature.enable(:namespace_level_work_items)
- Create a group level work item with the following query at http://127.0.0.1:3000/-/graphql-explorer so you can use it in the next query
mutation { workItemCreate(input: {namespacePath: "flightjs", title: "test group level work item", workItemTypeId: "gid://gitlab/WorkItems::Type/1"}) { errors workItem { id iid } } }
- update the description on the newly created work item
mutation { workItemUpdate(input: {id: "<gid_from_previous_step>", descriptionWidget: {description: "updated description"}}) { errors workItem { iid workItemType { name } widgets { ... on WorkItemWidgetDescription { description } } } } }
- Fetch description diffs:
{ group(fullPath: "flightjs") { id workItem(iid: "<work_item_iid>") { nodes { widgets { ... on WorkItemWidgetNotes { discussions { nodes { notes { nodes { systemNoteMetadata { descriptionVersion { diffPath deletePath } } } } } } } } } } } }
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.
Related to #431215 (closed)
Edited by Mario Celi