Stats and languages results incorrect due to graphql 100 records limit
See original GitHub issueDescribe the bug
The current language and stats card results are incorrect for users with more than 100 repositories (see https://docs.github.com/en/graphql/overview/resource-limitations). This is because we are currently only fetching the first 100 repositories of a user account.
Because of this not all languages and stars of a user are represented.
Expected behaviour
I think we can use pagination options (i.e. cursor
, after
, endCursor
objects) to loop through all repositories of a user account (see https://stackoverflow.com/a/70039506/8135687). @anuraghazra Let me know what you think.
TODOs
- Allow fetching of multiple pages for the languages data. #2111.
- Improve the stats card such that it fetches more pages when a user has more than 100 repositories with stars. #2100
- Merge #2159 to make this available on private Vercel instances while giving us the control to disable it on the public instance because of rate-limiting problems.
Issue Analytics
- State:
- Created a year ago
- Reactions:4
- Comments:14 (5 by maintainers)
Top Results From Across the Web
GraphQL vs. REST APIs: Why you shouldn't use GraphQL
Now that we've outlined some use cases that call for using GraphQL, let's discuss some reasons why you might want to consider using...
Read more >Pagination | GraphQL
A common use case in GraphQL is traversing the relationship between sets of objects. There are a number of different ways that these...
Read more >Result size calculation for Facebook's GraphQL query language
To cope with this problem, they propose an algorithm for calculating the exact size of the response object from a query sent to...
Read more >Export limits - Product Documentation | ServiceNow
If you export 30,000 records, the number of records returned from the database is 10,000. The number of records specified for export exceeds...
Read more >How to display more than 100 documents with graphql?
I'm aware of the max 20 documents limit and how to use cursors and pagination to retrieve all the results. But the problem...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@milkshakegum Thanks for your report. Merging:
Will fix the issues you experience. You can already use these on your own fork. They are not yet merged into the master because we have to ensure the GraphQL and Vercel limits are not hit. We will likely implement this as an opt-in for Vercel instance and Github Action users (see https://github.com/anuraghazra/github-readme-stats/issues/2179 and https://github.com/anuraghazra/github-readme-stats/pull/2159).
Just a heads-up, I filled a feature request to make the total stars a specific user has received on his/her repositories available under the user object of the GraphQL API. Adding this feature would also enable #2111 on the public instance.https://github.com/community/community/discussions/35677. Please add your support there.