mirror of
https://github.com/pd4d10/git-touch.git
synced 2026-04-30 19:37:35 -05:00
refactor: commits screen type
This commit is contained in:
60
lib/graphql/github_commits.graphql
Normal file
60
lib/graphql/github_commits.graphql
Normal file
@@ -0,0 +1,60 @@
|
||||
fragment T on Ref {
|
||||
target {
|
||||
... on Commit {
|
||||
oid
|
||||
url
|
||||
messageHeadline
|
||||
committedDate
|
||||
author {
|
||||
name
|
||||
avatarUrl
|
||||
user {
|
||||
login
|
||||
}
|
||||
}
|
||||
# status {
|
||||
# state
|
||||
# }
|
||||
__typename
|
||||
history(first: 30, after: $after) {
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
endCursor
|
||||
}
|
||||
nodes {
|
||||
oid
|
||||
url
|
||||
messageHeadline
|
||||
committedDate
|
||||
author {
|
||||
name
|
||||
avatarUrl
|
||||
user {
|
||||
login
|
||||
}
|
||||
}
|
||||
# status {
|
||||
# state
|
||||
# }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query(
|
||||
$owner: String!
|
||||
$name: String!
|
||||
$ref: String!
|
||||
$hasRef: Boolean!
|
||||
$after: String
|
||||
) {
|
||||
repository(owner: $owner, name: $name) {
|
||||
defaultBranchRef @skip(if: $hasRef) {
|
||||
...T
|
||||
}
|
||||
ref(qualifiedName: $ref) @include(if: $hasRef) {
|
||||
...T
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user