Skip to content

Instantly share code, notes, and snippets.

@spacelatte
Last active August 28, 2023 11:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spacelatte/2d8c4a6d64a9ceef96f44044e249d6e7 to your computer and use it in GitHub Desktop.
Save spacelatte/2d8c4a6d64a9ceef96f44044e249d6e7 to your computer and use it in GitHub Desktop.
github api v4 gists query graphql
query gistquery($name: String = "pvtmert", $count: Int = 100, $field: GistOrderField = UPDATED_AT, $sort: OrderDirection = DESC, $privacy: GistPrivacy = ALL) {
user(login: $name) {
gists(first: $count, orderBy: {field: $field, direction: $sort}, privacy: $privacy) {
nodes {
name
owner {
id
login
url
resourcePath
avatarUrl
}
isPublic
isFork
id
createdAt
description
pushedAt
resourcePath
updatedAt
url
viewerHasStarred
stargazers {
totalCount
}
}
edges {
node {
id
name
owner {
login
id
avatarUrl
resourcePath
url
}
isPublic
isFork
description
createdAt
pushedAt
resourcePath
updatedAt
url
viewerHasStarred
files {
encodedName
encoding
extension
isImage
isTruncated
name
size
text
}
forks {
totalCount
}
comments {
totalCount
}
}
cursor
}
totalCount
pageInfo {
endCursor
hasNextPage
hasPreviousPage
startCursor
}
}
email
databaseId
name
login
location
isEmployee
isHireable
isBountyHunter
isCampusExpert
isDeveloperProgramMember
isSiteAdmin
isViewer
status {
id
message
}
twitterUsername
}
meta {
gitIpAddresses
hookIpAddresses
importerIpAddresses
pagesIpAddresses
}
rateLimit {
cost
limit
nodeCount
remaining
resetAt
}
viewer {
id
}
}
{
"name": "pvtmert",
"count": 100,
"field": "UPDATED_AT",
"sort": "DESC",
"privacy": "ALL"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment