List branches most recently updated first


#1

HI,
I am currently using the following query to fetch the list of all branches :
{
repository(owner: “owner”, name: “name”) {
refs(first: 100, refPrefix: “refs/heads/”) {
totalCount
edges{
node {
name
associatedPullRequests(states: OPEN) {
totalCount
}
target {
__typename
… on Commit {
author {
date
user {
login
}
}
}
}
}
}
pageInfo {
endCursor
hasNextPage
}
}
}
}

The refs tag does have a direction field but i dont see any way to specify orderBy
The above query gives the list of branches with date of the last commit… But there is not order … .I want to order them by date in desc order ?