title: Using GitHub's GraphQL API, how can I tell who closed an issue or pull request?
body: <p>Given an issue or pull request number, I'd like to get the following information using a single query to the <a href="https://developer.github.com/v4/" rel="nofollow noreferrer">GitHub GraphQL API</a>:</p>
  
  <ul>
  <li>Whether it is an issue or a pull request</li>
  <li>The state of the issue (open, closed) or PR (open, closed, merged)</li>
  <li>If the issue or PR is closed, who closed it and when</li>
  <li>If the issue or PR was merged, who merged it and when</li>
  </ul>
  
  <p>Using the following query, I have all of this working except for determining <strong>who</strong> closed the issue or PR:</p>
  
  <pre><code>{
    repository(owner: "Automattic", name: "wp-calypso") {
      issueOrPullRequest(number: 23226) {
        __typename
        ... on Closable {
          closed
          closedAt
          # TODO: How to get ClosedEvent { actor } ?
        }
        ... on Issue {
          issueState: state
          title
        }
        ... on PullRequest {
          prState: state
          title
          merged
          mergedAt
          mergeCommit {
            committer {
              user {
                login
              }
            }
          }
        }
      }
    }
  }
  </code></pre>
  
  <p>I'm running this query using GitHub's GraphQL Explorer tool:  <a href="https://developer.github.com/v4/explorer/" rel="nofollow noreferrer">https://developer.github.com/v4/explorer/</a></p>
  
  <p>I can see the issue or PR as a <a href="https://developer.github.com/v4/interface/closable/" rel="nofollow noreferrer"><code>Closable</code></a> but I think I need to get from there to the last <a href="https://developer.github.com/v4/object/closedevent/" rel="nofollow noreferrer"><code>ClosedEvent</code></a> that affected that object.  This is the part I haven't been able to figure out yet.</p>
  
  <p>In GitHub's v3 REST API, determining all of this information may require 2 requests.  For a pull request that was <strong>closed</strong> (not <strong>merged</strong>), the <code>closed_by</code> field only appears when requesting the pull request <strong>as an issue</strong> (via the <a href="https://developer.github.com/v3/issues/" rel="nofollow noreferrer"><code>issues</code></a> API call).  All other pull request information is available via the <a href="https://developer.github.com/v3/pulls/" rel="nofollow noreferrer"><code>pulls</code></a> API call.</p>