4

Using the GitHub GraphQL API, I can construct a timeline of when users starred any repo:

query { 
  repository(owner:"danvk", name:"source-map-explorer") {
    stargazers(first:100) {
      edges {
        starredAt
        node {
          login
        }
      }
    }
  }
}

Here's the response:

{
  "data": {
    "repository": {
      "stargazers": {
        "edges": [
          {
            "starredAt": "2015-10-16T16:08:02Z",
            "node": {
              "login": "danvk"
            }
          },
          {
            "starredAt": "2015-10-16T23:23:26Z",
            "node": {
              "login": "risq"
            }
          },
          ...
        ],
      }
    }
  }
}

If I want to construct a chart of the number of stars that a repo has over time, I also need the unstar events. Is it possible to get access to these using the GraphQL API?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.