nschloe / github-trends

:chart_with_upwards_trend: GitHub star history plots
GNU General Public License v3.0
261 stars 12 forks source link

graphql #20

Closed nschloe closed 3 years ago

nschloe commented 3 years ago

GitHub's graphql API is interesting as it doesn't have the limitation of the first 40k stargazers. Unfortunately, the stargazer queries, e.g.,

{
  repository(owner: "nschloe", name: "meshio") {
    description
    stargazerCount
    stargazers (first: 1) {
      pageInfo {
        endCursor
        hasNextPage
        hasPreviousPage
        startCursor
      }
      totalCount
      edges {
       starredAt
       node {
         login
       }
      }
    }

don't have random access when it comes to pagination: There's only the before and after argument to which you supply a cursor. See