title: Github graphQL API get branches of a repository sorted by pushDate
body: <p>We can get all branches of a particular repository with the query mentioned <a href="https://stackoverflow.com/questions/55487432/how-can-we-list-all-the-branches-in-a-repo-using-github-graphql-api">here</a>.</p>
  <pre><code>query { 
      repository(owner: &quot;&lt;userName&gt;&quot;, name: &quot;&lt;repoName&gt;&quot;) {
      refs(first: 10, refPrefix: &quot;refs/heads/&quot;,after:&quot;&lt;cursor&gt;&quot;) {
        edges {
          node {
            name
              target {
                ... on Commit {
                  author {
                    name
                    email
                    user {
                      login
                    }
                  }
                  pushedDate
                  oid
                }
              }
          }
        }
      }
    }
  }
  
  
  </code></pre>
  <p>But would it be possible for the names to be returned in a sorted order by <code>pushedDate</code> ( or any relevant dates ) . for eg if my repository has 2 branches ( <code>branch 1</code> with pushdate as <code>March 1</code> and <code>branch 2</code> with pushDate as <code>March 10</code> I want <code>branch2</code> to be  returned before <code>branch 1</code>).</p>
  <p>We can do that sorting manually but the issue is that my query is paginated , so this sort would just order only those branches in the current page.</p>