V4 API missing PullRequest closedAt attribute

schema-request

#1

When I try to fetch closed at for a pull request I get: "message":"Field 'closedAt' doesn't exist on type 'PullRequest'"

I can access the boolean fields Closed Merged and Opened, as well as openedAt and mergedAt

I see that closedAt exists on the v3 API but not the v4 api. Can it be added?


#2

Thank you for the request, @jeanettehead! I’ve added this to our project board to prioritize, it should be relatively straightforward for us to add. We’ll let you know back here once it’s been added.


#3

Hi @jeannettehead! Just wanted to let you know that we’ve added closedAt to PullRequest. Here’s an example query:

{
  repository(name: "graphql-client", owner: "github") {
    pullRequests(last:2) {
      nodes {
        state
        closedAt
      }
    }
  }
}

and result:

{
  "data": {
    "repository": {
      "pullRequests": {
        "nodes": [
          {
            "state": "MERGED",
            "closedAt": "2017-11-24T15:03:20Z"
          },
          {
            "state": "OPEN",
            "closedAt": null
          }
        ]
      }
    }
  }
}