File tree 1 file changed +40
-39
lines changed
1 file changed +40
-39
lines changed Original file line number Diff line number Diff line change @@ -35,16 +35,18 @@ const GetBranchesSchema = z.object({
35
35
repository : z . discriminatedUnion ( '__typename' , [
36
36
z . object ( {
37
37
__typename : z . literal ( 'Repository' ) ,
38
- branches : z . object ( {
39
- edges : z . array (
40
- z
41
- . object ( {
42
- node : BranchSchema ,
43
- } )
44
- . nullable ( )
45
- ) ,
46
- pageInfo : PageInfoSchema ,
47
- } ) ,
38
+ branches : z
39
+ . object ( {
40
+ edges : z . array (
41
+ z
42
+ . object ( {
43
+ node : BranchSchema ,
44
+ } )
45
+ . nullable ( )
46
+ ) ,
47
+ pageInfo : PageInfoSchema ,
48
+ } )
49
+ . nullable ( ) ,
48
50
} ) ,
49
51
RepoNotFoundErrorSchema ,
50
52
RepoOwnerNotActivatedErrorSchema ,
@@ -53,41 +55,40 @@ const GetBranchesSchema = z.object({
53
55
. nullable ( ) ,
54
56
} )
55
57
56
- const query = `
57
- query GetBranches(
58
- $owner: String!
59
- $repo: String!
60
- $after: String
61
- $filters: BranchesSetFilters
62
- ) {
63
- owner(username: $owner) {
64
- repository(name: $repo) {
65
- __typename
66
- ... on Repository {
67
- branches(first: 20, after: $after, filters: $filters) {
68
- edges {
69
- node {
70
- name
71
- head {
72
- commitid
73
- }
58
+ const query = `query GetBranches(
59
+ $owner: String!
60
+ $repo: String!
61
+ $after: String
62
+ $filters: BranchesSetFilters
63
+ ) {
64
+ owner(username: $owner) {
65
+ repository(name: $repo) {
66
+ __typename
67
+ ... on Repository {
68
+ branches(first: 20, after: $after, filters: $filters) {
69
+ edges {
70
+ node {
71
+ name
72
+ head {
73
+ commitid
74
74
}
75
75
}
76
- pageInfo {
77
- hasNextPage
78
- endCursor
79
- }
76
+ }
77
+ pageInfo {
78
+ hasNextPage
79
+ endCursor
80
80
}
81
81
}
82
- ... on NotFoundError {
83
- message
84
- }
85
- ... on OwnerNotActivatedError {
86
- message
87
- }
82
+ }
83
+ ... on NotFoundError {
84
+ message
85
+ }
86
+ ... on OwnerNotActivatedError {
87
+ message
88
88
}
89
89
}
90
- }`
90
+ }
91
+ }`
91
92
92
93
type GetBranchesReturn = { branches : Branch [ ] ; pageInfo : PageInfo | null }
93
94
You can’t perform that action at this time.
0 commit comments