GraphQL contributionCalendar doesn't match GitHub profile contribution graph #201216
Replies: 3 comments
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
|
This happens due to a timezone mismatch between your local environment and the API.GitHub actually calculates timestamps differently depending on the action: commits use the specific time zone information in the commit timestamp, while things like opening issues or pull requests use your browser's time zone. However, the overall contribution calendar strictly timestamps things according to Coordinated Universal Time (UTC) rather than your local time zone. Because of this offset, if you pushed your commit late at night or early in the morning, the API definitely counted it, but it probably just bumped it into the previous or next day. Check the contributionCount for 2026-07-05 and 2026-07-07 in your GraphQL response. You will likely see your missing "July 6" contribution sitting right there on an adjacent day. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
🏷️ Discussion Type
Bug
💬 Feature/Topic Area
API
Body
Hi everyone,
I'm building a personal portfolio that displays my GitHub contribution graph using the GraphQL API.
I'm querying:
user(login: $username) {
contributionsCollection(from: $from, to: $to) {
contributionCalendar {
weeks {
contributionDays {
date
contributionCount
}
}
}
}
}
The data is returned correctly and I'm simply rendering contributionCount for each day.
However, I've noticed a discrepancy:
My GitHub profile shows 1 contribution on July 6.
The GraphQL API returns:
{
"date": "2026-07-06",
"contributionCount": 0
}
I've verified the following:
So the only mismatch is that GitHub's profile shows a contribution while contributionCalendar reports 0 for that date.
Has anyone experienced this before?
Is this expected due to a delay in the GraphQL API, or is there another field or query I should be using to match the profile contribution graph more accurately?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions