Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
sample GQL query for fetching files via GitHub GQL API
{
# get a list of files off the tree entries
repository(owner: "gjtorikian", name: "html-proofer") {
ref(qualifiedName: "refs/heads/master") {
target {
... on Commit {
tree {
entries {
object {
__typename
... on Blob {
id
text
}
}
}
}
}
}
}
}
# or lookup directly off of a node
node(id: "MDQ6QmxvYjg0NTE4OTM6ZGExMzJmOTIxMDVjZGQxMGVhYjViMjVhMGZlNmRhNGQ0MGJiOWIyOQ==") {
__typename
... on Blob {
text
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment