Skip to content

Graphql query to fetch commits from all time #3494

Answered by qwerty541
itsvaibhavmishra asked this question in Q&A
Discussion options

You must be logged in to vote

Hey, @itsvaibhavmishra! We do not use GraphQL for this purpose. Currently we fetch total commits count using GitHub HTTP API. Here is the code: https://github.com/anuraghazra/github-readme-stats/blob/master/src/fetchers/stats-fetcher.js#L170-L187. As far as i know it was implemented this way because it's impossible to fetch total commits count using GraphQL, only count for selected year, at least it was like that a few years ago, i didn't checked if something changed.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rickstaa
Comment options

Answer selected by qwerty541
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants