Skip to content

Instantly share code, notes, and snippets.

@b5
Created November 24, 2022 23:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save b5/138a901b6e5689d238ab98bd3ed4089d to your computer and use it in GitHub Desktop.
Save b5/138a901b6e5689d238ab98bd3ed4089d to your computer and use it in GitHub Desktop.
GraphQL Example: Fetch stargazers at "go" topic
query ($cursor: String) {
topic(name: "go") {
repositories(
after: $cursor
first: 100
orderBy: {field: STARGAZERS, direction: DESC}
) {
totalCount
pageInfo {
endCursor
startCursor
}
nodes {
id
url
name
stargazerCount
issues {
totalCount
}
repositoryTopics(first:25) {
totalCount
nodes {
topic {
name
}
}
}
updatedAt
primaryLanguage {
name
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment