anuraghazra / anuraghazra/github-readme-stats
The most used languages only count the oldest 100 projects
- Dominant language
- JavaScript
- Stars
- 79.8k
- Forks
- 37.7k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
The most used languages count only count the oldest 100 projects sorted by time. The new projects are not counted
**Expected behavior**
The most used languages count should count all projects
**Screenshots / Live demo link (paste the github-readme-stats link as markdown image)**
I test it in https://docs.github.com/en/graphql/overview/explorer
The current graphql is like
```graphql
{
user(login: "tc-imba") {
repositories(ownerAffiliations: OWNER, isFork: false, first: 100) {
nodes {
name
languages(first: 10, orderBy: {field: SIZE, direction: DESC}) {
edges {
size
node {
color
name
}
}
}
}
}
}
}
```
github limit the `first` to be 100, but we can add a parameter `start` to use the pagination and traverse all pages.
For example, we can add edges { cursor } and get a list of cursors
```graphql
{
user(login: "tc-imba") {
repositories(ownerAffiliations: OWNER, isFork: false, first: 100) {
edges {
cursor
}
nodes {
name
languages(first: 10, orderBy: {field: SIZE, direction: DESC}) {
edges {
size
node {
color
name
}
}
}
}
}
}
}
```
It shows that the cursor of the last repo is `Y3Vyc29yOnYyOpHOCWwxJg==`, and then we can use `start: "Y3Vyc29yOnYyOpHOCWwxJg=="` to find the 101-200 repos, and so on
**Additional context**
I'll draft a PR for this later
Contributor guide
Assessment
This issue has not been assessed yet.