Menu
Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
Open source
Visualizing data from Github GraphQL API
We can leverage Github graphql API to query the github stats using this infinity plugin graphql api.
Sample Query given in the below example. You can customize your query to bring the stats you needed.
Query Editor
Query Used:
graphql
{
repository(owner: "$GithubUser", name: "$GithubRepo") {
issues(last: 20) {
edges {
node {
author {
login
}
state
title
url
}
}
}
}
}
Datasource Configuration
Select Basic user authentication mode and use your github username and PAT token as password
Github Organization Summary example
corresponding query used is given below
graphql
{
repositoryOwner(login: "$GithubUser") {
repositories(first: 100) {
data: nodes {
name
stargazers {
totalCount
}
openissues: issues(states: OPEN) {
totalCount
}
openpr: pullRequests(states: OPEN) {
totalCount
}
}
}
}
}
Note:
- Queries are not paginated
- Github rate limits apply
- If you need paginated and full set of results, use grafana github stats plugin
Was this page helpful?
Related resources from Grafana Labs
Additional helpful documentation, links, and articles:
Video
Unify your data with Grafana plugins: Datadog, Splunk, MongoDB, and more
In this webinar, learn how to leverage Grafana's plugin ecosystem for access to 80+ data sources, including plugins for Datadog, Splunk, MongoDB, and more.
Video
Grafana plugins demo: GitHub, GitLab, JIRA, ServiceNow, and more
In this webinar, we'll show you how to use Grafana to unlock these insights and have better visibility into the performance of your software development team.
Video
All about Grafana plugins: Visualizing disparate data sources in one place
Grafana Enterprise plugins are integrations with other commercial monitoring tools (such as Datadog, Splunk, New Relic, ServiceNow, Oracle, and Dynatrace) that are created, maintained, and supported by the Grafana Labs team.