Skip to content

Fix Todo GraphQL type which always had null project and group fields

What does this MR do and why?

GraphQL queries used to retrieve informations about user todos always returned null value for group and project fields.

This MR fixes that behaviour 🙂

Screenshots or screen recordings

How to set up and validate locally

Run this GraphQL query and make sure the project and group fields are not null bearing in mind that only one of them can actually be non-null at a time since a todo can either be associated to a group or to a project:

query {
  currentUser {
    todos {
      nodes {
        id
        group {
          fullPath
        }
        project {
          fullPath
        }
      }
    }
  }
}

MR acceptance checklist

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

Merge request reports