Skip to content

Instantly share code, notes, and snippets.

@Deep-Codes
Last active June 12, 2021 15:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Deep-Codes/fcf84a1fee3bd3eb3ba9253b7d631e37 to your computer and use it in GitHub Desktop.
Save Deep-Codes/fcf84a1fee3bd3eb3ba9253b7d631e37 to your computer and use it in GitHub Desktop.
Graphql API calls to get last updates git files from Github
{
"path": "pages/changelog.mdx",
"repo": "chloromaps"
}
query($path: String!, $repo: String!) {
repository(owner: "Deep-Codes", name: $repo) {
object(expression: "main") {
... on Commit {
history(first: 100, path: $path) {
nodes {
author {
date
name
user {
avatarUrl
url
}
}
}
}
}
}
}
}
{
"data": {
"repository": {
"object": {
"history": {
"nodes": [
{
"author": {
"date": "2021-05-31T07:40:23.000+05:30",
"name": "Deepankar Bhade",
"user": {
"avatarUrl": "https://avatars.githubusercontent.com/u/61158210?u=9b834e47bd65c4f60398f628d9722e57187060fa&v=4",
"url": "https://github.com/Deep-Codes"
}
}
},
{
"author": {
"date": "2021-05-29T15:22:09.000+05:30",
"name": "Deepankar Bhade",
"user": {
"avatarUrl": "https://avatars.githubusercontent.com/u/61158210?u=9b834e47bd65c4f60398f628d9722e57187060fa&v=4",
"url": "https://github.com/Deep-Codes"
}
}
}
]
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment