GraphQL: Merge Request "Closed At" date not present

Summary

When using GraphQL APIs to fetch details of a merge request, the "Closed At" date is a missing field, even if the merge request has been closed, it does not populate. On the other hand when using REST API, this field is populated as "null" if the merge request is not closed and is populated with the closing date if the merge request is indeed closed.

The field is not mentioned in the GraphQL docs for merge request which leads me to believe it is not a supported field but it is in fact mentioned as a response attribute in REST API docs for merge request and is returned when using the REST API

Steps to reproduce

  1. Note down the project full path and the merge request iid of a merge request that is in closed state
  2. Use the GraphiQL Explorer to query that merge request.
  3. Note that in all fields dropdown, there is no field called "closedAt" image

Example Project

The above steps can be tried out with any project using GraphiQL Explorer

{
  project(fullPath: "gitlab-org/gitlab") {
    mergeRequest(iid: "154530") {
      mergedAt
      createdAt
      closedAt
    }
  }
}

The above query should throw an error

image

What is the current bug behavior?

The "Closed At" field is missing from Merge Request fields when using GraphQL API but is present in REST API

What is the expected correct behavior?

The "Closed At" field should be present in Merge Request fields when using GraphQL

Edited by Ghost User