How to search for Github Repositories using GraphQL, and get its total commits count as well in return?
It looks strange to me that all fields available describing Repositories contains total count of commit comments but not total count of commits.
Here's an example of how to get the total number of commits for the master
branch in the rails/rails repository:
query {
repository(owner:"rails", name:"rails") {
object(expression:"master") {
... on Commit {
history {
totalCount
}
}
}
}
}