Skip to content

Add GraphQL Todoable interface for to-do targets

What does this MR do and why?

This MR adds a new Todoable GraphQL interface that represents the target of a to-do item. That way, the GraphQL to-do definition is more complete and includes a target just like the to-do REST API. It is also needed to migrate the to-do system to Vue (see #344777) and subsequently to complete the todo dropdown in !63256 (closed).

Screenshots or screen recordings

How to set up and validate locally

  1. Have at least one todo
  2. Go to the GraphQL explorer (/-/graphql-explorer)
  3. Use the following query
    {
      currentUser {
        todos {
          nodes {
            body
            target {
              webUrl
              ... on Issue {
                title
              }
            }
          }
        }
      }
    }
  4. See the target on your todo with its webUrl
    And if the target of your todo is an issue:
  5. See the title on the target as well

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 Kev

Merge request reports