Cannot fetch more than 100 branches, even when using pagination #468
Labels
hacktoberfest
Issues for participation in Hacktoberfest
Status: Up for grabs
Issues that are ready to be worked on by anyone
Type: Bug
Something isn't working as documented
Type: Support
Any questions, information, or general needs around the SDK or GitHub APIs
Hi,
I'm trying to fetch all of the branches in a selected repository, as well as their last commit date. I use the commit date in order to programmatically sort the branches in a descending chronological order. The repository currently has more than 300 branches.
I've tried multiple solutions and queries, but I cannot fetch more than 100 branches, even when using multiple requests, and the
hasNextPage
flag is set tofalse
once the 100th ref is reached.When the
first
variable is set to a number lower than 100, the pagination seems to work, but still stops at 100 branches. For example, iffirst
is set to 20, then 5 pages will be fetched with 100 branches in total.I've also tried using https://github.com/octokit/plugin-paginate-graphql.js but I got the same results.
Here is the query I'm currently using:
Thanks in advance!
The text was updated successfully, but these errors were encountered: