Skip to content

Add WorkItemUpdate mutation to GraphQL API

Mario Celi requested to merge 346134-update-work-item-state-api into master

What does this MR do and why?

Adds workItemUpdate mutation to the GraphQL API. This first iteration only allows to close or reopen a work item through the state_event argument.

How to set up and validate locally

  1. Run bundle exec rails console
  2. Run Feature.enable(:work_items)
  3. Execute a GraphQL query like
mutation {
  workItemUpdate(input: { id: "gid://gitlab/WorkItem/1", stateEvent: CLOSE }) {
    workItem {
      title
      state
      id
      title
    }
  }
}

MR acceptance checklist

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

Related to #346134 (closed)

Merge request reports

Loading