fix: split to packages to support gql gen

This commit is contained in:
Rongjian Zhang
2022-10-02 00:29:54 +08:00
parent efc2359f27
commit 706d456c46
42 changed files with 939 additions and 74 deletions

View File

@@ -0,0 +1,48 @@
fragment CommitsRefCommit on Commit {
history(first: 30, after: $after) {
pageInfo {
hasNextPage
endCursor
}
nodes {
url
messageHeadline
committedDate
author {
name
avatarUrl
user {
login
}
}
status {
state
}
}
}
}
fragment CommitsRef on Ref {
target {
... on Commit {
...CommitsRefCommit
}
}
}
query Commits(
$owner: String!
$name: String!
$ref: String!
$hasRef: Boolean!
$after: String
) {
repository(owner: $owner, name: $name) {
defaultBranchRef @skip(if: $hasRef) {
...CommitsRef
}
ref(qualifiedName: $ref) @include(if: $hasRef) {
...CommitsRef
}
}
}