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

Draft saved
Draft discarded

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.