I’ve been trying to fetch a file (eg. package.json) from each of our organisation repositories. It worked ok for package.json, but when we pick package-lock.json, the contents gets truncated. I’m having trouble working out how to then fetch the full contents of the truncated file.
Here’s the query I’ve got so far. There are other issues with it (eg. it only finds the first matching file per repo), but that’s less of a concern for me at the moment.
query {
organization(login:"myorg") {
repositories(first:100) {
pageInfo {
startCursor
hasNextPage
endCursor
}
nodes {
name
isArchived
pushedAt
packageLock: object(expression:"master:package-lock.json") {
... on Blob {
isTruncated
commitResourcePath
byteSize
id
commitUrl
isBinary
text
}
}
}
}
}
}
Is there another API endpoint I can call with one of the other properties in order to download the full content?