executablebooks / github-activity

Simple markdown changelogs for GitHub repositories
https://github-activity.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
49 stars 11 forks source link

Split into multiple requests when total number of items is > 1000 #80

Open choldgraf opened 1 year ago

choldgraf commented 1 year ago

Context

GitHub's GraphQL API will restrict any calls to 1000 total nodes. This means that a really large query (e.g. all of the history of a project) will be cut off at 1000 items.

Proposal

To get around this, we could detect when a query has > 1000 nodes, and split up the call to fetch the data into multiple queries. This is similar to how our "pagination" works, but would be across queries rather than pages of the same query. We might be able to use dates for this as an easy first step.