Skip to content

Instantly share code, notes, and snippets.

@MichaelCurrin
Last active December 24, 2022 23:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save MichaelCurrin/8dccd523356ce7e018e4041664186aa3 to your computer and use it in GitHub Desktop.
Save MichaelCurrin/8dccd523356ce7e018e4041664186aa3 to your computer and use it in GitHub Desktop.
GitHub GraphQL - Get repos for a target GH user or org
{
"owner": "MichaelCurrin"
}
query Repos($owner: String!, $cursor: String) {
repositoryOwner(login: $owner) {
repositories(
first: 100
ownerAffiliations: OWNER
privacy: PUBLIC
isFork: false
isLocked: false
orderBy: { field: NAME, direction: ASC }
after: $cursor
) {
totalCount
pageInfo {
hasNextPage
endCursor
}
nodes {
name
description
# Add more fields here.
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment