Debian Codegraph @

srht/gitsrht/operations.graphql

raw
1 query repositoryIDByName($name: String!) {
2 me {
3 repository(name: $name) {
4 id
5 }
6 }
7 }
8
9 query repositoryIDByUser($username: String!, $name: String!) {
10 user(username: $username) {
11 repository(name: $name) {
12 id
13 }
14 }
15 }
16
17 query listArtifacts($name: String!) {
18 me {
19 repository(name: $name) {
20 ...artifacts
21 }
22 }
23 }
24
25 query listArtifactsByUser($username: String!, $name: String!) {
26 user(username: $username) {
27 repository(name: $name) {
28 ...artifacts
29 }
30 }
31 }
32
33 fragment artifacts on Repository {
34 references {
35 results {
36 name
37 artifacts {
38 results {
39 id
40 filename
41 }
42 }
43 }
44 }
45 }
46
47 query repositoryByName($name: String!) {
48 me {
49 repository(name: $name) {
50 ...repository
51 }
52 }
53 }
54
55 query repositoryByUser($username: String!, $name: String!) {
56 user(username: $username) {
57 repository(name: $name) {
58 ...repository
59 }
60 }
61 }
62
63 fragment repository on Repository {
64 name
65 description
66 visibility
67 references {
68 results {
69 name
70 }
71 }
72 log {
73 results {
74 shortId
75 author {
76 name
77 email
78 time
79 }
80 message
81 }
82 }
83 owner {
84 canonicalName
85 }
86 }
87
88 query repositories($cursor: Cursor) {
89 repositories(cursor: $cursor) {
90 ...repos
91 }
92 }
93
94 query repositoriesByUser($username: String!, $cursor: Cursor) {
95 user(username: $username) {
96 repositories(cursor: $cursor) {
97 ...repos
98 }
99 }
100 }
101
102 fragment repos on RepositoryCursor {
103 results {
104 name
105 description
106 visibility
107 owner {
108 canonicalName
109 }
110 }
111 cursor
112 }
113
114 query exportRepository($username: String!, $name: String!) {
115 user(username: $username) {
116 repository(name: $name) {
117 ...repositoryExport
118 }
119 }
120 }
121
122 query exportRepositories($cursor: Cursor) {
123 repositories(cursor: $cursor) {
124 results {
125 ...repositoryExport
126 }
127 cursor
128 }
129 }
130
131 fragment repositoryExport on Repository {
132 name
133 owner {
134 canonicalName
135 }
136 description
137 visibility
138 readme
139 HEAD {
140 name
141 }
142 }
143
144 query sshSettings {
145 version {
146 settings {
147 sshUser
148 }
149 }
150 }
151
152 query completeRepositories {
153 repositories {
154 results {
155 name
156 }
157 }
158 }
159
160 query revsByRepoName($name: String!) {
161 me {
162 repository(name: $name) {
163 ...revs
164 }
165 }
166 }
167
168 query revsByUser($username: String!, $name: String!) {
169 user(username: $username) {
170 repository(name: $name) {
171 ...revs
172 }
173 }
174 }
175
176 fragment revs on Repository {
177 references {
178 results {
179 name
180 }
181 }
182 }
183
184 query aclByRepoName($name: String!, $cursor: Cursor) {
185 me {
186 ...acl
187 }
188 }
189
190 query aclByUser($username: String!, $name: String!, $cursor: Cursor) {
191 user(username: $username) {
192 ...acl
193 }
194 }
195
196 fragment acl on User {
197 repository(name: $name) {
198 acls(cursor: $cursor) {
199 results {
200 id
201 created
202 entity {
203 canonicalName
204 }
205 mode
206 }
207 cursor
208 }
209 }
210 }
211
212 query userWebhooks($cursor: Cursor) {
213 userWebhooks(cursor: $cursor) {
214 results {
215 id
216 url
217 }
218 cursor
219 }
220 }
221
222 query completeCoMaintainers($name: String!) {
223 me {
224 repository(name: $name) {
225 acls {
226 results {
227 entity {
228 canonicalName
229 }
230 }
231 }
232 }
233 }
234 }
235
236 query gitWebhooks($repositoryID: Int!, $cursor: Cursor) {
237 gitWebhooks(repositoryID: $repositoryID, cursor: $cursor) {
238 results {
239 id
240 url
241 }
242 cursor
243 }
244 }
245
246 query myUsername {
247 me {
248 canonicalName
249 }
250 }
251
252 mutation uploadArtifact($repoId: Int!, $revspec: String!, $file: Upload!) {
253 uploadArtifact(repoId: $repoId, revspec: $revspec, file: $file) {
254 filename
255 }
256 }
257
258 mutation deleteArtifact($id: Int!) {
259 deleteArtifact(id: $id) {
260 filename
261 }
262 }
263
264 mutation createRepository(
265 $name: String!
266 $visibility: Visibility!
267 $description: String
268 $cloneUrl: String
269 ) {
270 createRepository(
271 name: $name
272 visibility: $visibility
273 description: $description
274 cloneUrl: $cloneUrl
275 ) {
276 id
277 owner {
278 canonicalName
279 }
280 name
281 }
282 }
283
284 mutation deleteRepository($id: Int!) {
285 deleteRepository(id: $id) {
286 name
287 }
288 }
289
290 mutation updateACL($repoId: Int!, $mode: AccessMode!, $entity: String!) {
291 updateACL(repoId: $repoId, mode: $mode, entity: $entity) {
292 entity {
293 canonicalName
294 }
295 }
296 }
297
298 mutation deleteACL($id: Int!) {
299 deleteACL(id: $id) {
300 entity {
301 canonicalName
302 }
303 repository {
304 name
305 }
306 }
307 }
308
309 mutation deleteUserWebhook($id: Int!) {
310 deleteUserWebhook(id: $id) {
311 id
312 }
313 }
314
315 mutation createUserWebhook($config: UserWebhookInput!) {
316 createUserWebhook(config: $config) {
317 id
318 }
319 }
320
321 mutation updateRepository($id: Int!, $input: RepoInput!) {
322 updateRepository(id: $id, input: $input) {
323 name
324 }
325 }
326
327 mutation clearCustomReadme($id: Int!) {
328 updateRepository(id: $id, input: { readme: null }) {
329 name
330 }
331 }
332
333 mutation clearDescription($id: Int!) {
334 updateRepository(id: $id, input: { description: null }) {
335 name
336 }
337 }
338
339 mutation createGitWebhook($config: GitWebhookInput!) {
340 createGitWebhook(config: $config) {
341 id
342 }
343 }
344
345 mutation deleteGitWebhook($id: Int!) {
346 deleteGitWebhook(id: $id) {
347 id
348 }
349 }