Skip to content

Add workItemUpdateWidgets mutation to GraphQL API

Mario Celi requested to merge 334809-update-widget-mutation into master

What does this MR do and why?

The MR implements a new GraphQL mutation for updating the widget attributes of a work item.

How to set up and validate locally

  1. Enable :work_items FF

    Feature.enable(:work_items)
  2. Grab an issue and note its id and description.

If the issue's id is 460, its work item GID is gid://gitlab/WorkItem/449 (gid://gitlab/Issue/460 equally works.)

  1. Run the sample GraphQL query
mutation {
  workItemUpdate(input: {id: "gid://gitlab/WorkItem/460", weightWidget: { weight: 2 } }) {
    workItem {
      id
      title
      widgets {
        ... on WorkItemWidgetWeight {
          weight
        }
      }
    }
    errors
  }
}

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by euko

Merge request reports

Loading