Add a Graphql Endpoint for Retrieving Raw file content
Problem to solve
Add a GraphQL endpoint for retrieving raw file content. This feature is especially useful if a user was a get the contents of a file without cloning the entire repository.
Intended users
Developers
User experience goal
I have an example query for Github.com, where text is the raw file text.
query RepoFiles($owner: String!, $name: String!, $path: String!) {
repository(owner: $owner, name: $name) {
object(expression: $path) {
... on Tree {
entries {
name
type
object {
... on Blob {
byteSize
text
}
}
}
}
}
}
}
Please close if this is a duplicate. Thanks Gitlab team <3
Links / references
Edited by Steve