I'm new to the GraphQL API for Github. I'm trying to get the commit message and pushedAt date on each file, which you typically see on the root webpage of any github repo showing all the files for the branch (e.g. https://github.com/Alamofire/Alamofire ).
.github Updates for Xcode 13.3 (#3576) 3 days ago
Tests Fix 2020 and 2021 Deprecation Warnings (#3555) last month
My graphql seems to be returning nothing ("commitData": {}) in the Explorer for the commit data. What am I doing wrong?
fragment Files on Tree {
entries {
oid
name
type
path
extension
metaData: object {
... on Blob {
byteSize
isBinary
}
}
commitData: object {
... on Commit {
oid
pushedDate
message
}
}
}
}
query Files($owner: String!, $repo: String!, $branch: String!) {
repository(owner: $owner, name: $repo) {
... on Repository {
object(expression: $branch) {
... on Tree {
...Files
}
}
}
}
}
Query Variables:
{
"repo": "Alamofire",
"branch": "HEAD:",
"owner": "Alamofire"
}