summaryrefslogblamecommitdiffstatshomepage
path: root/frontend/operations.graphql
blob: 5c41080f38c3503a3b257786e897d81e688ec98c (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696























































































































































































































































































































































































































































































































































































































































































































                                                                                                   
fragment Image on Image {
	hash
	width
	height
}

fragment Page on Page {
	id
	path
	image {
		id
		hash
		aspectRatio
		width
		height
	}
	comicId
}

fragment Comic on Comic {
	id
	title
	originalTitle
	favourite
	cover {
		...Image
	}
	tags {
		name
		description
	}
	artists {
		name
	}
	characters {
		name
	}
	worlds {
		name
	}
	circles {
		name
	}
}

fragment FullArchive on FullArchive {
	id
	name
	path
	size
	createdAt
	mtime
	organized
	pageCount
	pages {
		...Page
	}
	comics {
		...Comic
	}
}

fragment Archive on Archive {
	id
	name
	size
	pageCount
	cover {
		...Image
	}
}

fragment FullComic on FullComic {
	id
	title
	originalTitle
	url
	language
	direction
	date
	layout
	rating
	category
	censorship
	favourite
	createdAt
	updatedAt
	organized
	bookmarked
	pages {
		...Page
	}
	archive {
		id
	}
	tags {
		id
		name
		description
	}
	artists {
		id
		name
	}
	characters {
		id
		name
	}
	worlds {
		id
		name
	}
	circles {
		id
		name
	}
}

fragment ComicScraper on ComicScraper {
	id
	name
}

fragment ScrapeComicResult on ScrapeComicResult {
	data {
		artists
		category
		censorship
		characters
		circles
		date
		direction
		language
		layout
		originalTitle
		url
		rating
		tags
		title
		worlds
	}
	warnings
}

query comics($pagination: Pagination!, $filter: ComicFilterInput, $sort: ComicSortInput) {
	comics(pagination: $pagination, filter: $filter, sort: $sort) {
		edges {
			...Comic
		}
		count
	}
}

query archives($pagination: Pagination!, $filter: ArchiveFilterInput, $sort: ArchiveSortInput) {
	archives(pagination: $pagination, filter: $filter, sort: $sort) {
		edges {
			...Archive
		}
		count
	}
}

query archive($id: Int!) {
	archive(id: $id) {
		... on FullArchive {
			...FullArchive
		}
		... on Error {
			message
		}
	}
}

query comic($id: Int!) {
	comic(id: $id) {
		... on FullComic {
			...FullComic
		}
		... on Error {
			message
		}
	}
}

query tag($id: Int!) {
	tag(id: $id) {
		... on FullTag {
			id
			name
			description
			namespaces {
				id
				name
			}
		}
		... on Error {
			message
		}
	}
}

query tags($pagination: Pagination!, $filter: TagFilterInput, $sort: TagSortInput) {
	tags(pagination: $pagination, filter: $filter, sort: $sort) {
		edges {
			id
			name
			description
		}
		count
	}
}

query namespace($id: Int!) {
	namespace(id: $id) {
		... on Namespace {
			id
			name
			sortName
		}
		... on Error {
			message
		}
	}
}

query namespaces(
	$pagination: Pagination!
	$filter: NamespaceFilterInput
	$sort: NamespaceSortInput
) {
	namespaces(pagination: $pagination, filter: $filter, sort: $sort) {
		count
		edges {
			id
			name
		}
	}
}

query comicTagList($forFilter: Boolean = false) {
	comicTags(forFilter: $forFilter) {
		edges {
			id
			name
		}
	}
}

query artistList {
	artists {
		edges {
			id
			name
		}
	}
}

query characterList {
	characters {
		edges {
			id
			name
		}
	}
}

query circleList {
	circles {
		edges {
			id
			name
		}
	}
}

query worldList {
	worlds {
		edges {
			id
			name
		}
	}
}

query namespaceList {
	namespaces {
		edges {
			id
			name
		}
	}
}

query artists($pagination: Pagination!, $filter: ArtistFilterInput, $sort: ArtistSortInput) {
	artists(pagination: $pagination, filter: $filter, sort: $sort) {
		count
		edges {
			id
			name
		}
	}
}

query artist($id: Int!) {
	artist(id: $id) {
		... on Artist {
			id
			name
		}
		... on Error {
			message
		}
	}
}

query characters(
	$pagination: Pagination!
	$filter: CharacterFilterInput
	$sort: CharacterSortInput
) {
	characters(pagination: $pagination, filter: $filter, sort: $sort) {
		count
		edges {
			id
			name
		}
	}
}

query character($id: Int!) {
	character(id: $id) {
		... on Character {
			id
			name
		}
		... on Error {
			message
		}
	}
}

query circles($pagination: Pagination!, $filter: CircleFilterInput, $sort: CircleSortInput) {
	circles(pagination: $pagination, filter: $filter, sort: $sort) {
		count
		edges {
			id
			name
		}
	}
}

query circle($id: Int!) {
	circle(id: $id) {
		... on Circle {
			id
			name
		}
		... on Error {
			message
		}
	}
}

query worlds($pagination: Pagination!, $filter: WorldFilterInput, $sort: WorldSortInput) {
	worlds(pagination: $pagination, filter: $filter, sort: $sort) {
		count
		edges {
			id
			name
		}
	}
}

query world($id: Int!) {
	world(id: $id) {
		... on World {
			id
			name
		}
		... on Error {
			message
		}
	}
}

query comicScrapers($id: Int!) {
	comicScrapers(id: $id) {
		id
		name
	}
}

query scrapeComic($id: Int!, $scraper: String!) {
	scrapeComic(id: $id, scraper: $scraper) {
		... on ScrapeComicResult {
			...ScrapeComicResult
		}
		... on Error {
			message
		}
	}
}

query frontpage {
	recent: comics(pagination: { items: 6 }, sort: { on: CREATED_AT, direction: DESCENDING }) {
		edges {
			...Comic
		}
		count
	}
	favourites: comics(
		pagination: { items: 6 }
		filter: { include: { favourite: true } }
		sort: { on: RANDOM }
	) {
		edges {
			...Comic
		}
		count
	}
	bookmarked: comics(
		pagination: { items: 6 }
		filter: { include: { bookmarked: true } }
		sort: { on: RANDOM }
	) {
		edges {
			...Comic
		}
		count
	}
}

mutation addComic($input: AddComicInput!) {
	addComic(input: $input) {
		... on AddComicSuccess {
			message
			archivePagesRemaining
		}
		... on Error {
			message
		}
	}
}

mutation updateArchives($ids: [Int!]!, $input: UpdateArchiveInput!) {
	updateArchives(ids: $ids, input: $input) {
		... on Success {
			message
		}
		... on Error {
			message
		}
	}
}

mutation updateComics($ids: [Int!]!, $input: UpdateComicInput!) {
	updateComics(ids: $ids, input: $input) {
		... on Success {
			message
		}
		... on Error {
			message
		}
	}
}

mutation upsertComics($ids: [Int!]!, $input: UpsertComicInput!) {
	upsertComics(ids: $ids, input: $input) {
		... on Success {
			message
		}
		... on Error {
			message
		}
	}
}

mutation deleteArchives($ids: [Int!]!) {
	deleteArchives(ids: $ids) {
		... on Success {
			message
		}
		... on Error {
			message
		}
	}
}

mutation deleteComics($ids: [Int!]!) {
	deleteComics(ids: $ids) {
		... on Success {
			message
		}
		... on Error {
			message
		}
	}
}

mutation addTag($input: AddTagInput!) {
	addTag(input: $input) {
		... on Success {
			message
		}
		... on Error {
			message
		}
	}
}

mutation updateTags($ids: [Int!]!, $input: UpdateTagInput!) {
	updateTags(ids: $ids, input: $input) {
		... on Success {
			message
		}
		... on Error {
			message
		}
	}
}

mutation deleteTags($ids: [Int!]!) {
	deleteTags(ids: $ids) {
		... on Success {
			message
		}
		... on Error {
			message
		}
	}
}

mutation addNamespace($input: AddNamespaceInput!) {
	addNamespace(input: $input) {
		... on Success {
			message
		}
		... on Error {
			message
		}
	}
}

mutation updateNamespaces($ids: [Int!]!, $input: UpdateNamespaceInput!) {
	updateNamespaces(ids: $ids, input: $input) {
		... on Success {
			message
		}
		... on Error {
			message
		}
	}
}

mutation deleteNamespaces($ids: [Int!]!) {
	deleteNamespaces(ids: $ids) {
		... on Success {
			message
		}
		... on Error {
			message
		}
	}
}

mutation addArtist($input: AddArtistInput!) {
	addArtist(input: $input) {
		... on Success {
			message
		}
		... on Error {
			message
		}
	}
}

mutation updateArtists($ids: [Int!]!, $input: UpdateArtistInput!) {
	updateArtists(ids: $ids, input: $input) {
		... on Success {
			message
		}
		... on Error {
			message
		}
	}
}

mutation deleteArtists($ids: [Int!]!) {
	deleteArtists(ids: $ids) {
		... on Success {
			message
		}
		... on Error {
			message
		}
	}
}

mutation addCharacter($input: AddCharacterInput!) {
	addCharacter(input: $input) {
		... on Success {
			message
		}
		... on Error {
			message
		}
	}
}

mutation updateCharacters($ids: [Int!]!, $input: UpdateCharacterInput!) {
	updateCharacters(ids: $ids, input: $input) {
		... on Success {
			message
		}
		... on Error {
			message
		}
	}
}

mutation deleteCharacters($ids: [Int!]!) {
	deleteCharacters(ids: $ids) {
		... on Success {
			message
		}
		... on Error {
			message
		}
	}
}

mutation addCircle($input: AddCircleInput!) {
	addCircle(input: $input) {
		... on Success {
			message
		}
		... on Error {
			message
		}
	}
}

mutation updateCircles($ids: [Int!]!, $input: UpdateCircleInput!) {
	updateCircles(ids: $ids, input: $input) {
		... on Success {
			message
		}
		... on Error {
			message
		}
	}
}

mutation deleteCircles($ids: [Int!]!) {
	deleteCircles(ids: $ids) {
		... on Success {
			message
		}
		... on Error {
			message
		}
	}
}

mutation addWorld($input: AddWorldInput!) {
	addWorld(input: $input) {
		... on Success {
			message
		}
		... on Error {
			message
		}
	}
}

mutation updateWorlds($ids: [Int!]!, $input: UpdateWorldInput!) {
	updateWorlds(ids: $ids, input: $input) {
		... on Success {
			message
		}
		... on Error {
			message
		}
	}
}

mutation deleteWorlds($ids: [Int!]!) {
	deleteWorlds(ids: $ids) {
		... on Success {
			message
		}
		... on Error {
			message
		}
	}
}