Created
December 6, 2016 19:28
-
-
Save davidcelis/dd85095ac46e159b9efe420687aaa7e9 to your computer and use it in GitHub Desktop.
An example GraphQL query to get `git blame` data from the GitHub GraphQL 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
query { | |
repositoryOwner(login: "github") { | |
repository(name: "linguist") { | |
object(expression: "master") { | |
... on Commit { | |
blame(path: "github-linguist.gemspec") { | |
ranges { | |
startingLine | |
endingLine | |
age | |
commit { | |
oid | |
author { | |
name | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
@Phalguna2125 Not directly in the query; ranges
doesn't support any arguments. But, it does just return an array as opposed to a paginated collection, so clients can just filter by startingLine
and endingLine
themselves
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@davidcelis Hi , thanke for the query.. is there a way to add restrictions on startingline and endingline values to fetch only those values.
Help is much appreciated.thank you