Last active
February 22, 2019 14:24
-
-
Save gjtorikian/7c53efc1ec6284472b4ea1d9883babd5 to your computer and use it in GitHub Desktop.
sample GQL query for fetching files via GitHub GQL API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
# 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