-
-
Notifications
You must be signed in to change notification settings - Fork 26.3k
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
{
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
{
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