1// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
2
3package graph
4
5import (
6 "bytes"
7 context "context"
8 fmt "fmt"
9 strconv "strconv"
10 sync "sync"
11 time "time"
12
13 graphql "github.com/99designs/gqlgen/graphql"
14 introspection "github.com/99designs/gqlgen/graphql/introspection"
15 bug "github.com/MichaelMure/git-bug/bug"
16 models "github.com/MichaelMure/git-bug/graphql/models"
17 git "github.com/MichaelMure/git-bug/util/git"
18 gqlparser "github.com/vektah/gqlparser"
19 ast "github.com/vektah/gqlparser/ast"
20)
21
22// NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
23func NewExecutableSchema(cfg Config) graphql.ExecutableSchema {
24 return &executableSchema{
25 resolvers: cfg.Resolvers,
26 directives: cfg.Directives,
27 complexity: cfg.Complexity,
28 }
29}
30
31type Config struct {
32 Resolvers ResolverRoot
33 Directives DirectiveRoot
34 Complexity ComplexityRoot
35}
36
37type ResolverRoot interface {
38 AddCommentOperation() AddCommentOperationResolver
39 AddCommentTimelineItem() AddCommentTimelineItemResolver
40 Bug() BugResolver
41 CommentHistoryStep() CommentHistoryStepResolver
42 CreateOperation() CreateOperationResolver
43 CreateTimelineItem() CreateTimelineItemResolver
44 LabelChangeOperation() LabelChangeOperationResolver
45 LabelChangeTimelineItem() LabelChangeTimelineItemResolver
46 Mutation() MutationResolver
47 Query() QueryResolver
48 Repository() RepositoryResolver
49 SetStatusOperation() SetStatusOperationResolver
50 SetStatusTimelineItem() SetStatusTimelineItemResolver
51 SetTitleOperation() SetTitleOperationResolver
52 SetTitleTimelineItem() SetTitleTimelineItemResolver
53}
54
55type DirectiveRoot struct {
56}
57
58type ComplexityRoot struct {
59 AddCommentOperation struct {
60 Author func(childComplexity int) int
61 Date func(childComplexity int) int
62 Message func(childComplexity int) int
63 Files func(childComplexity int) int
64 }
65
66 AddCommentTimelineItem struct {
67 Hash func(childComplexity int) int
68 Author func(childComplexity int) int
69 Message func(childComplexity int) int
70 Files func(childComplexity int) int
71 CreatedAt func(childComplexity int) int
72 LastEdit func(childComplexity int) int
73 Edited func(childComplexity int) int
74 History func(childComplexity int) int
75 }
76
77 Bug struct {
78 Id func(childComplexity int) int
79 HumanId func(childComplexity int) int
80 Status func(childComplexity int) int
81 Title func(childComplexity int) int
82 Labels func(childComplexity int) int
83 Author func(childComplexity int) int
84 CreatedAt func(childComplexity int) int
85 LastEdit func(childComplexity int) int
86 Comments func(childComplexity int, after *string, before *string, first *int, last *int) int
87 Timeline func(childComplexity int, after *string, before *string, first *int, last *int) int
88 Operations func(childComplexity int, after *string, before *string, first *int, last *int) int
89 }
90
91 BugConnection struct {
92 Edges func(childComplexity int) int
93 Nodes func(childComplexity int) int
94 PageInfo func(childComplexity int) int
95 TotalCount func(childComplexity int) int
96 }
97
98 BugEdge struct {
99 Cursor func(childComplexity int) int
100 Node func(childComplexity int) int
101 }
102
103 Comment struct {
104 Author func(childComplexity int) int
105 Message func(childComplexity int) int
106 Files func(childComplexity int) int
107 }
108
109 CommentConnection struct {
110 Edges func(childComplexity int) int
111 Nodes func(childComplexity int) int
112 PageInfo func(childComplexity int) int
113 TotalCount func(childComplexity int) int
114 }
115
116 CommentEdge struct {
117 Cursor func(childComplexity int) int
118 Node func(childComplexity int) int
119 }
120
121 CommentHistoryStep struct {
122 Message func(childComplexity int) int
123 Date func(childComplexity int) int
124 }
125
126 CreateOperation struct {
127 Author func(childComplexity int) int
128 Date func(childComplexity int) int
129 Title func(childComplexity int) int
130 Message func(childComplexity int) int
131 Files func(childComplexity int) int
132 }
133
134 CreateTimelineItem struct {
135 Hash func(childComplexity int) int
136 Author func(childComplexity int) int
137 Message func(childComplexity int) int
138 Files func(childComplexity int) int
139 CreatedAt func(childComplexity int) int
140 LastEdit func(childComplexity int) int
141 Edited func(childComplexity int) int
142 History func(childComplexity int) int
143 }
144
145 LabelChangeOperation struct {
146 Hash func(childComplexity int) int
147 Author func(childComplexity int) int
148 Date func(childComplexity int) int
149 Added func(childComplexity int) int
150 Removed func(childComplexity int) int
151 }
152
153 LabelChangeTimelineItem struct {
154 Hash func(childComplexity int) int
155 Author func(childComplexity int) int
156 Date func(childComplexity int) int
157 Added func(childComplexity int) int
158 Removed func(childComplexity int) int
159 }
160
161 Mutation struct {
162 NewBug func(childComplexity int, repoRef *string, title string, message string, files []git.Hash) int
163 AddComment func(childComplexity int, repoRef *string, prefix string, message string, files []git.Hash) int
164 ChangeLabels func(childComplexity int, repoRef *string, prefix string, added []string, removed []string) int
165 Open func(childComplexity int, repoRef *string, prefix string) int
166 Close func(childComplexity int, repoRef *string, prefix string) int
167 SetTitle func(childComplexity int, repoRef *string, prefix string, title string) int
168 Commit func(childComplexity int, repoRef *string, prefix string) int
169 }
170
171 OperationConnection struct {
172 Edges func(childComplexity int) int
173 Nodes func(childComplexity int) int
174 PageInfo func(childComplexity int) int
175 TotalCount func(childComplexity int) int
176 }
177
178 OperationEdge struct {
179 Cursor func(childComplexity int) int
180 Node func(childComplexity int) int
181 }
182
183 PageInfo struct {
184 HasNextPage func(childComplexity int) int
185 HasPreviousPage func(childComplexity int) int
186 StartCursor func(childComplexity int) int
187 EndCursor func(childComplexity int) int
188 }
189
190 Person struct {
191 Email func(childComplexity int) int
192 Name func(childComplexity int) int
193 AvatarUrl func(childComplexity int) int
194 }
195
196 Query struct {
197 DefaultRepository func(childComplexity int) int
198 Repository func(childComplexity int, id string) int
199 }
200
201 Repository struct {
202 AllBugs func(childComplexity int, after *string, before *string, first *int, last *int, query *string) int
203 Bug func(childComplexity int, prefix string) int
204 }
205
206 SetStatusOperation struct {
207 Hash func(childComplexity int) int
208 Author func(childComplexity int) int
209 Date func(childComplexity int) int
210 Status func(childComplexity int) int
211 }
212
213 SetStatusTimelineItem struct {
214 Hash func(childComplexity int) int
215 Author func(childComplexity int) int
216 Date func(childComplexity int) int
217 Status func(childComplexity int) int
218 }
219
220 SetTitleOperation struct {
221 Hash func(childComplexity int) int
222 Author func(childComplexity int) int
223 Date func(childComplexity int) int
224 Title func(childComplexity int) int
225 Was func(childComplexity int) int
226 }
227
228 SetTitleTimelineItem struct {
229 Hash func(childComplexity int) int
230 Author func(childComplexity int) int
231 Date func(childComplexity int) int
232 Title func(childComplexity int) int
233 Was func(childComplexity int) int
234 }
235
236 TimelineItemConnection struct {
237 Edges func(childComplexity int) int
238 Nodes func(childComplexity int) int
239 PageInfo func(childComplexity int) int
240 TotalCount func(childComplexity int) int
241 }
242
243 TimelineItemEdge struct {
244 Cursor func(childComplexity int) int
245 Node func(childComplexity int) int
246 }
247}
248
249type AddCommentOperationResolver interface {
250 Date(ctx context.Context, obj *bug.AddCommentOperation) (time.Time, error)
251}
252type AddCommentTimelineItemResolver interface {
253 CreatedAt(ctx context.Context, obj *bug.AddCommentTimelineItem) (time.Time, error)
254 LastEdit(ctx context.Context, obj *bug.AddCommentTimelineItem) (time.Time, error)
255}
256type BugResolver interface {
257 Status(ctx context.Context, obj *bug.Snapshot) (models.Status, error)
258
259 LastEdit(ctx context.Context, obj *bug.Snapshot) (time.Time, error)
260 Comments(ctx context.Context, obj *bug.Snapshot, after *string, before *string, first *int, last *int) (models.CommentConnection, error)
261 Timeline(ctx context.Context, obj *bug.Snapshot, after *string, before *string, first *int, last *int) (models.TimelineItemConnection, error)
262 Operations(ctx context.Context, obj *bug.Snapshot, after *string, before *string, first *int, last *int) (models.OperationConnection, error)
263}
264type CommentHistoryStepResolver interface {
265 Date(ctx context.Context, obj *bug.CommentHistoryStep) (time.Time, error)
266}
267type CreateOperationResolver interface {
268 Date(ctx context.Context, obj *bug.CreateOperation) (time.Time, error)
269}
270type CreateTimelineItemResolver interface {
271 CreatedAt(ctx context.Context, obj *bug.CreateTimelineItem) (time.Time, error)
272 LastEdit(ctx context.Context, obj *bug.CreateTimelineItem) (time.Time, error)
273}
274type LabelChangeOperationResolver interface {
275 Date(ctx context.Context, obj *bug.LabelChangeOperation) (time.Time, error)
276}
277type LabelChangeTimelineItemResolver interface {
278 Date(ctx context.Context, obj *bug.LabelChangeTimelineItem) (time.Time, error)
279}
280type MutationResolver interface {
281 NewBug(ctx context.Context, repoRef *string, title string, message string, files []git.Hash) (bug.Snapshot, error)
282 AddComment(ctx context.Context, repoRef *string, prefix string, message string, files []git.Hash) (bug.Snapshot, error)
283 ChangeLabels(ctx context.Context, repoRef *string, prefix string, added []string, removed []string) (bug.Snapshot, error)
284 Open(ctx context.Context, repoRef *string, prefix string) (bug.Snapshot, error)
285 Close(ctx context.Context, repoRef *string, prefix string) (bug.Snapshot, error)
286 SetTitle(ctx context.Context, repoRef *string, prefix string, title string) (bug.Snapshot, error)
287 Commit(ctx context.Context, repoRef *string, prefix string) (bug.Snapshot, error)
288}
289type QueryResolver interface {
290 DefaultRepository(ctx context.Context) (*models.Repository, error)
291 Repository(ctx context.Context, id string) (*models.Repository, error)
292}
293type RepositoryResolver interface {
294 AllBugs(ctx context.Context, obj *models.Repository, after *string, before *string, first *int, last *int, query *string) (models.BugConnection, error)
295 Bug(ctx context.Context, obj *models.Repository, prefix string) (*bug.Snapshot, error)
296}
297type SetStatusOperationResolver interface {
298 Date(ctx context.Context, obj *bug.SetStatusOperation) (time.Time, error)
299 Status(ctx context.Context, obj *bug.SetStatusOperation) (models.Status, error)
300}
301type SetStatusTimelineItemResolver interface {
302 Date(ctx context.Context, obj *bug.SetStatusTimelineItem) (time.Time, error)
303 Status(ctx context.Context, obj *bug.SetStatusTimelineItem) (models.Status, error)
304}
305type SetTitleOperationResolver interface {
306 Date(ctx context.Context, obj *bug.SetTitleOperation) (time.Time, error)
307}
308type SetTitleTimelineItemResolver interface {
309 Date(ctx context.Context, obj *bug.SetTitleTimelineItem) (time.Time, error)
310}
311
312func field_Bug_comments_args(rawArgs map[string]interface{}) (map[string]interface{}, error) {
313 args := map[string]interface{}{}
314 var arg0 *string
315 if tmp, ok := rawArgs["after"]; ok {
316 var err error
317 var ptr1 string
318 if tmp != nil {
319 ptr1, err = graphql.UnmarshalString(tmp)
320 arg0 = &ptr1
321 }
322
323 if err != nil {
324 return nil, err
325 }
326 }
327 args["after"] = arg0
328 var arg1 *string
329 if tmp, ok := rawArgs["before"]; ok {
330 var err error
331 var ptr1 string
332 if tmp != nil {
333 ptr1, err = graphql.UnmarshalString(tmp)
334 arg1 = &ptr1
335 }
336
337 if err != nil {
338 return nil, err
339 }
340 }
341 args["before"] = arg1
342 var arg2 *int
343 if tmp, ok := rawArgs["first"]; ok {
344 var err error
345 var ptr1 int
346 if tmp != nil {
347 ptr1, err = graphql.UnmarshalInt(tmp)
348 arg2 = &ptr1
349 }
350
351 if err != nil {
352 return nil, err
353 }
354 }
355 args["first"] = arg2
356 var arg3 *int
357 if tmp, ok := rawArgs["last"]; ok {
358 var err error
359 var ptr1 int
360 if tmp != nil {
361 ptr1, err = graphql.UnmarshalInt(tmp)
362 arg3 = &ptr1
363 }
364
365 if err != nil {
366 return nil, err
367 }
368 }
369 args["last"] = arg3
370 return args, nil
371
372}
373
374func field_Bug_timeline_args(rawArgs map[string]interface{}) (map[string]interface{}, error) {
375 args := map[string]interface{}{}
376 var arg0 *string
377 if tmp, ok := rawArgs["after"]; ok {
378 var err error
379 var ptr1 string
380 if tmp != nil {
381 ptr1, err = graphql.UnmarshalString(tmp)
382 arg0 = &ptr1
383 }
384
385 if err != nil {
386 return nil, err
387 }
388 }
389 args["after"] = arg0
390 var arg1 *string
391 if tmp, ok := rawArgs["before"]; ok {
392 var err error
393 var ptr1 string
394 if tmp != nil {
395 ptr1, err = graphql.UnmarshalString(tmp)
396 arg1 = &ptr1
397 }
398
399 if err != nil {
400 return nil, err
401 }
402 }
403 args["before"] = arg1
404 var arg2 *int
405 if tmp, ok := rawArgs["first"]; ok {
406 var err error
407 var ptr1 int
408 if tmp != nil {
409 ptr1, err = graphql.UnmarshalInt(tmp)
410 arg2 = &ptr1
411 }
412
413 if err != nil {
414 return nil, err
415 }
416 }
417 args["first"] = arg2
418 var arg3 *int
419 if tmp, ok := rawArgs["last"]; ok {
420 var err error
421 var ptr1 int
422 if tmp != nil {
423 ptr1, err = graphql.UnmarshalInt(tmp)
424 arg3 = &ptr1
425 }
426
427 if err != nil {
428 return nil, err
429 }
430 }
431 args["last"] = arg3
432 return args, nil
433
434}
435
436func field_Bug_operations_args(rawArgs map[string]interface{}) (map[string]interface{}, error) {
437 args := map[string]interface{}{}
438 var arg0 *string
439 if tmp, ok := rawArgs["after"]; ok {
440 var err error
441 var ptr1 string
442 if tmp != nil {
443 ptr1, err = graphql.UnmarshalString(tmp)
444 arg0 = &ptr1
445 }
446
447 if err != nil {
448 return nil, err
449 }
450 }
451 args["after"] = arg0
452 var arg1 *string
453 if tmp, ok := rawArgs["before"]; ok {
454 var err error
455 var ptr1 string
456 if tmp != nil {
457 ptr1, err = graphql.UnmarshalString(tmp)
458 arg1 = &ptr1
459 }
460
461 if err != nil {
462 return nil, err
463 }
464 }
465 args["before"] = arg1
466 var arg2 *int
467 if tmp, ok := rawArgs["first"]; ok {
468 var err error
469 var ptr1 int
470 if tmp != nil {
471 ptr1, err = graphql.UnmarshalInt(tmp)
472 arg2 = &ptr1
473 }
474
475 if err != nil {
476 return nil, err
477 }
478 }
479 args["first"] = arg2
480 var arg3 *int
481 if tmp, ok := rawArgs["last"]; ok {
482 var err error
483 var ptr1 int
484 if tmp != nil {
485 ptr1, err = graphql.UnmarshalInt(tmp)
486 arg3 = &ptr1
487 }
488
489 if err != nil {
490 return nil, err
491 }
492 }
493 args["last"] = arg3
494 return args, nil
495
496}
497
498func field_Mutation_newBug_args(rawArgs map[string]interface{}) (map[string]interface{}, error) {
499 args := map[string]interface{}{}
500 var arg0 *string
501 if tmp, ok := rawArgs["repoRef"]; ok {
502 var err error
503 var ptr1 string
504 if tmp != nil {
505 ptr1, err = graphql.UnmarshalString(tmp)
506 arg0 = &ptr1
507 }
508
509 if err != nil {
510 return nil, err
511 }
512 }
513 args["repoRef"] = arg0
514 var arg1 string
515 if tmp, ok := rawArgs["title"]; ok {
516 var err error
517 arg1, err = graphql.UnmarshalString(tmp)
518 if err != nil {
519 return nil, err
520 }
521 }
522 args["title"] = arg1
523 var arg2 string
524 if tmp, ok := rawArgs["message"]; ok {
525 var err error
526 arg2, err = graphql.UnmarshalString(tmp)
527 if err != nil {
528 return nil, err
529 }
530 }
531 args["message"] = arg2
532 var arg3 []git.Hash
533 if tmp, ok := rawArgs["files"]; ok {
534 var err error
535 var rawIf1 []interface{}
536 if tmp != nil {
537 if tmp1, ok := tmp.([]interface{}); ok {
538 rawIf1 = tmp1
539 } else {
540 rawIf1 = []interface{}{tmp}
541 }
542 }
543 arg3 = make([]git.Hash, len(rawIf1))
544 for idx1 := range rawIf1 {
545 err = (&arg3[idx1]).UnmarshalGQL(rawIf1[idx1])
546 }
547 if err != nil {
548 return nil, err
549 }
550 }
551 args["files"] = arg3
552 return args, nil
553
554}
555
556func field_Mutation_addComment_args(rawArgs map[string]interface{}) (map[string]interface{}, error) {
557 args := map[string]interface{}{}
558 var arg0 *string
559 if tmp, ok := rawArgs["repoRef"]; ok {
560 var err error
561 var ptr1 string
562 if tmp != nil {
563 ptr1, err = graphql.UnmarshalString(tmp)
564 arg0 = &ptr1
565 }
566
567 if err != nil {
568 return nil, err
569 }
570 }
571 args["repoRef"] = arg0
572 var arg1 string
573 if tmp, ok := rawArgs["prefix"]; ok {
574 var err error
575 arg1, err = graphql.UnmarshalString(tmp)
576 if err != nil {
577 return nil, err
578 }
579 }
580 args["prefix"] = arg1
581 var arg2 string
582 if tmp, ok := rawArgs["message"]; ok {
583 var err error
584 arg2, err = graphql.UnmarshalString(tmp)
585 if err != nil {
586 return nil, err
587 }
588 }
589 args["message"] = arg2
590 var arg3 []git.Hash
591 if tmp, ok := rawArgs["files"]; ok {
592 var err error
593 var rawIf1 []interface{}
594 if tmp != nil {
595 if tmp1, ok := tmp.([]interface{}); ok {
596 rawIf1 = tmp1
597 } else {
598 rawIf1 = []interface{}{tmp}
599 }
600 }
601 arg3 = make([]git.Hash, len(rawIf1))
602 for idx1 := range rawIf1 {
603 err = (&arg3[idx1]).UnmarshalGQL(rawIf1[idx1])
604 }
605 if err != nil {
606 return nil, err
607 }
608 }
609 args["files"] = arg3
610 return args, nil
611
612}
613
614func field_Mutation_changeLabels_args(rawArgs map[string]interface{}) (map[string]interface{}, error) {
615 args := map[string]interface{}{}
616 var arg0 *string
617 if tmp, ok := rawArgs["repoRef"]; ok {
618 var err error
619 var ptr1 string
620 if tmp != nil {
621 ptr1, err = graphql.UnmarshalString(tmp)
622 arg0 = &ptr1
623 }
624
625 if err != nil {
626 return nil, err
627 }
628 }
629 args["repoRef"] = arg0
630 var arg1 string
631 if tmp, ok := rawArgs["prefix"]; ok {
632 var err error
633 arg1, err = graphql.UnmarshalString(tmp)
634 if err != nil {
635 return nil, err
636 }
637 }
638 args["prefix"] = arg1
639 var arg2 []string
640 if tmp, ok := rawArgs["added"]; ok {
641 var err error
642 var rawIf1 []interface{}
643 if tmp != nil {
644 if tmp1, ok := tmp.([]interface{}); ok {
645 rawIf1 = tmp1
646 } else {
647 rawIf1 = []interface{}{tmp}
648 }
649 }
650 arg2 = make([]string, len(rawIf1))
651 for idx1 := range rawIf1 {
652 arg2[idx1], err = graphql.UnmarshalString(rawIf1[idx1])
653 }
654 if err != nil {
655 return nil, err
656 }
657 }
658 args["added"] = arg2
659 var arg3 []string
660 if tmp, ok := rawArgs["removed"]; ok {
661 var err error
662 var rawIf1 []interface{}
663 if tmp != nil {
664 if tmp1, ok := tmp.([]interface{}); ok {
665 rawIf1 = tmp1
666 } else {
667 rawIf1 = []interface{}{tmp}
668 }
669 }
670 arg3 = make([]string, len(rawIf1))
671 for idx1 := range rawIf1 {
672 arg3[idx1], err = graphql.UnmarshalString(rawIf1[idx1])
673 }
674 if err != nil {
675 return nil, err
676 }
677 }
678 args["removed"] = arg3
679 return args, nil
680
681}
682
683func field_Mutation_open_args(rawArgs map[string]interface{}) (map[string]interface{}, error) {
684 args := map[string]interface{}{}
685 var arg0 *string
686 if tmp, ok := rawArgs["repoRef"]; ok {
687 var err error
688 var ptr1 string
689 if tmp != nil {
690 ptr1, err = graphql.UnmarshalString(tmp)
691 arg0 = &ptr1
692 }
693
694 if err != nil {
695 return nil, err
696 }
697 }
698 args["repoRef"] = arg0
699 var arg1 string
700 if tmp, ok := rawArgs["prefix"]; ok {
701 var err error
702 arg1, err = graphql.UnmarshalString(tmp)
703 if err != nil {
704 return nil, err
705 }
706 }
707 args["prefix"] = arg1
708 return args, nil
709
710}
711
712func field_Mutation_close_args(rawArgs map[string]interface{}) (map[string]interface{}, error) {
713 args := map[string]interface{}{}
714 var arg0 *string
715 if tmp, ok := rawArgs["repoRef"]; ok {
716 var err error
717 var ptr1 string
718 if tmp != nil {
719 ptr1, err = graphql.UnmarshalString(tmp)
720 arg0 = &ptr1
721 }
722
723 if err != nil {
724 return nil, err
725 }
726 }
727 args["repoRef"] = arg0
728 var arg1 string
729 if tmp, ok := rawArgs["prefix"]; ok {
730 var err error
731 arg1, err = graphql.UnmarshalString(tmp)
732 if err != nil {
733 return nil, err
734 }
735 }
736 args["prefix"] = arg1
737 return args, nil
738
739}
740
741func field_Mutation_setTitle_args(rawArgs map[string]interface{}) (map[string]interface{}, error) {
742 args := map[string]interface{}{}
743 var arg0 *string
744 if tmp, ok := rawArgs["repoRef"]; ok {
745 var err error
746 var ptr1 string
747 if tmp != nil {
748 ptr1, err = graphql.UnmarshalString(tmp)
749 arg0 = &ptr1
750 }
751
752 if err != nil {
753 return nil, err
754 }
755 }
756 args["repoRef"] = arg0
757 var arg1 string
758 if tmp, ok := rawArgs["prefix"]; ok {
759 var err error
760 arg1, err = graphql.UnmarshalString(tmp)
761 if err != nil {
762 return nil, err
763 }
764 }
765 args["prefix"] = arg1
766 var arg2 string
767 if tmp, ok := rawArgs["title"]; ok {
768 var err error
769 arg2, err = graphql.UnmarshalString(tmp)
770 if err != nil {
771 return nil, err
772 }
773 }
774 args["title"] = arg2
775 return args, nil
776
777}
778
779func field_Mutation_commit_args(rawArgs map[string]interface{}) (map[string]interface{}, error) {
780 args := map[string]interface{}{}
781 var arg0 *string
782 if tmp, ok := rawArgs["repoRef"]; ok {
783 var err error
784 var ptr1 string
785 if tmp != nil {
786 ptr1, err = graphql.UnmarshalString(tmp)
787 arg0 = &ptr1
788 }
789
790 if err != nil {
791 return nil, err
792 }
793 }
794 args["repoRef"] = arg0
795 var arg1 string
796 if tmp, ok := rawArgs["prefix"]; ok {
797 var err error
798 arg1, err = graphql.UnmarshalString(tmp)
799 if err != nil {
800 return nil, err
801 }
802 }
803 args["prefix"] = arg1
804 return args, nil
805
806}
807
808func field_Query_repository_args(rawArgs map[string]interface{}) (map[string]interface{}, error) {
809 args := map[string]interface{}{}
810 var arg0 string
811 if tmp, ok := rawArgs["id"]; ok {
812 var err error
813 arg0, err = graphql.UnmarshalString(tmp)
814 if err != nil {
815 return nil, err
816 }
817 }
818 args["id"] = arg0
819 return args, nil
820
821}
822
823func field_Query___type_args(rawArgs map[string]interface{}) (map[string]interface{}, error) {
824 args := map[string]interface{}{}
825 var arg0 string
826 if tmp, ok := rawArgs["name"]; ok {
827 var err error
828 arg0, err = graphql.UnmarshalString(tmp)
829 if err != nil {
830 return nil, err
831 }
832 }
833 args["name"] = arg0
834 return args, nil
835
836}
837
838func field_Repository_allBugs_args(rawArgs map[string]interface{}) (map[string]interface{}, error) {
839 args := map[string]interface{}{}
840 var arg0 *string
841 if tmp, ok := rawArgs["after"]; ok {
842 var err error
843 var ptr1 string
844 if tmp != nil {
845 ptr1, err = graphql.UnmarshalString(tmp)
846 arg0 = &ptr1
847 }
848
849 if err != nil {
850 return nil, err
851 }
852 }
853 args["after"] = arg0
854 var arg1 *string
855 if tmp, ok := rawArgs["before"]; ok {
856 var err error
857 var ptr1 string
858 if tmp != nil {
859 ptr1, err = graphql.UnmarshalString(tmp)
860 arg1 = &ptr1
861 }
862
863 if err != nil {
864 return nil, err
865 }
866 }
867 args["before"] = arg1
868 var arg2 *int
869 if tmp, ok := rawArgs["first"]; ok {
870 var err error
871 var ptr1 int
872 if tmp != nil {
873 ptr1, err = graphql.UnmarshalInt(tmp)
874 arg2 = &ptr1
875 }
876
877 if err != nil {
878 return nil, err
879 }
880 }
881 args["first"] = arg2
882 var arg3 *int
883 if tmp, ok := rawArgs["last"]; ok {
884 var err error
885 var ptr1 int
886 if tmp != nil {
887 ptr1, err = graphql.UnmarshalInt(tmp)
888 arg3 = &ptr1
889 }
890
891 if err != nil {
892 return nil, err
893 }
894 }
895 args["last"] = arg3
896 var arg4 *string
897 if tmp, ok := rawArgs["query"]; ok {
898 var err error
899 var ptr1 string
900 if tmp != nil {
901 ptr1, err = graphql.UnmarshalString(tmp)
902 arg4 = &ptr1
903 }
904
905 if err != nil {
906 return nil, err
907 }
908 }
909 args["query"] = arg4
910 return args, nil
911
912}
913
914func field_Repository_bug_args(rawArgs map[string]interface{}) (map[string]interface{}, error) {
915 args := map[string]interface{}{}
916 var arg0 string
917 if tmp, ok := rawArgs["prefix"]; ok {
918 var err error
919 arg0, err = graphql.UnmarshalString(tmp)
920 if err != nil {
921 return nil, err
922 }
923 }
924 args["prefix"] = arg0
925 return args, nil
926
927}
928
929func field___Type_fields_args(rawArgs map[string]interface{}) (map[string]interface{}, error) {
930 args := map[string]interface{}{}
931 var arg0 bool
932 if tmp, ok := rawArgs["includeDeprecated"]; ok {
933 var err error
934 arg0, err = graphql.UnmarshalBoolean(tmp)
935 if err != nil {
936 return nil, err
937 }
938 }
939 args["includeDeprecated"] = arg0
940 return args, nil
941
942}
943
944func field___Type_enumValues_args(rawArgs map[string]interface{}) (map[string]interface{}, error) {
945 args := map[string]interface{}{}
946 var arg0 bool
947 if tmp, ok := rawArgs["includeDeprecated"]; ok {
948 var err error
949 arg0, err = graphql.UnmarshalBoolean(tmp)
950 if err != nil {
951 return nil, err
952 }
953 }
954 args["includeDeprecated"] = arg0
955 return args, nil
956
957}
958
959type executableSchema struct {
960 resolvers ResolverRoot
961 directives DirectiveRoot
962 complexity ComplexityRoot
963}
964
965func (e *executableSchema) Schema() *ast.Schema {
966 return parsedSchema
967}
968
969func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) {
970 switch typeName + "." + field {
971
972 case "AddCommentOperation.author":
973 if e.complexity.AddCommentOperation.Author == nil {
974 break
975 }
976
977 return e.complexity.AddCommentOperation.Author(childComplexity), true
978
979 case "AddCommentOperation.date":
980 if e.complexity.AddCommentOperation.Date == nil {
981 break
982 }
983
984 return e.complexity.AddCommentOperation.Date(childComplexity), true
985
986 case "AddCommentOperation.message":
987 if e.complexity.AddCommentOperation.Message == nil {
988 break
989 }
990
991 return e.complexity.AddCommentOperation.Message(childComplexity), true
992
993 case "AddCommentOperation.files":
994 if e.complexity.AddCommentOperation.Files == nil {
995 break
996 }
997
998 return e.complexity.AddCommentOperation.Files(childComplexity), true
999
1000 case "AddCommentTimelineItem.hash":
1001 if e.complexity.AddCommentTimelineItem.Hash == nil {
1002 break
1003 }
1004
1005 return e.complexity.AddCommentTimelineItem.Hash(childComplexity), true
1006
1007 case "AddCommentTimelineItem.author":
1008 if e.complexity.AddCommentTimelineItem.Author == nil {
1009 break
1010 }
1011
1012 return e.complexity.AddCommentTimelineItem.Author(childComplexity), true
1013
1014 case "AddCommentTimelineItem.message":
1015 if e.complexity.AddCommentTimelineItem.Message == nil {
1016 break
1017 }
1018
1019 return e.complexity.AddCommentTimelineItem.Message(childComplexity), true
1020
1021 case "AddCommentTimelineItem.files":
1022 if e.complexity.AddCommentTimelineItem.Files == nil {
1023 break
1024 }
1025
1026 return e.complexity.AddCommentTimelineItem.Files(childComplexity), true
1027
1028 case "AddCommentTimelineItem.createdAt":
1029 if e.complexity.AddCommentTimelineItem.CreatedAt == nil {
1030 break
1031 }
1032
1033 return e.complexity.AddCommentTimelineItem.CreatedAt(childComplexity), true
1034
1035 case "AddCommentTimelineItem.lastEdit":
1036 if e.complexity.AddCommentTimelineItem.LastEdit == nil {
1037 break
1038 }
1039
1040 return e.complexity.AddCommentTimelineItem.LastEdit(childComplexity), true
1041
1042 case "AddCommentTimelineItem.edited":
1043 if e.complexity.AddCommentTimelineItem.Edited == nil {
1044 break
1045 }
1046
1047 return e.complexity.AddCommentTimelineItem.Edited(childComplexity), true
1048
1049 case "AddCommentTimelineItem.history":
1050 if e.complexity.AddCommentTimelineItem.History == nil {
1051 break
1052 }
1053
1054 return e.complexity.AddCommentTimelineItem.History(childComplexity), true
1055
1056 case "Bug.id":
1057 if e.complexity.Bug.Id == nil {
1058 break
1059 }
1060
1061 return e.complexity.Bug.Id(childComplexity), true
1062
1063 case "Bug.humanId":
1064 if e.complexity.Bug.HumanId == nil {
1065 break
1066 }
1067
1068 return e.complexity.Bug.HumanId(childComplexity), true
1069
1070 case "Bug.status":
1071 if e.complexity.Bug.Status == nil {
1072 break
1073 }
1074
1075 return e.complexity.Bug.Status(childComplexity), true
1076
1077 case "Bug.title":
1078 if e.complexity.Bug.Title == nil {
1079 break
1080 }
1081
1082 return e.complexity.Bug.Title(childComplexity), true
1083
1084 case "Bug.labels":
1085 if e.complexity.Bug.Labels == nil {
1086 break
1087 }
1088
1089 return e.complexity.Bug.Labels(childComplexity), true
1090
1091 case "Bug.author":
1092 if e.complexity.Bug.Author == nil {
1093 break
1094 }
1095
1096 return e.complexity.Bug.Author(childComplexity), true
1097
1098 case "Bug.createdAt":
1099 if e.complexity.Bug.CreatedAt == nil {
1100 break
1101 }
1102
1103 return e.complexity.Bug.CreatedAt(childComplexity), true
1104
1105 case "Bug.lastEdit":
1106 if e.complexity.Bug.LastEdit == nil {
1107 break
1108 }
1109
1110 return e.complexity.Bug.LastEdit(childComplexity), true
1111
1112 case "Bug.comments":
1113 if e.complexity.Bug.Comments == nil {
1114 break
1115 }
1116
1117 args, err := field_Bug_comments_args(rawArgs)
1118 if err != nil {
1119 return 0, false
1120 }
1121
1122 return e.complexity.Bug.Comments(childComplexity, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int)), true
1123
1124 case "Bug.timeline":
1125 if e.complexity.Bug.Timeline == nil {
1126 break
1127 }
1128
1129 args, err := field_Bug_timeline_args(rawArgs)
1130 if err != nil {
1131 return 0, false
1132 }
1133
1134 return e.complexity.Bug.Timeline(childComplexity, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int)), true
1135
1136 case "Bug.operations":
1137 if e.complexity.Bug.Operations == nil {
1138 break
1139 }
1140
1141 args, err := field_Bug_operations_args(rawArgs)
1142 if err != nil {
1143 return 0, false
1144 }
1145
1146 return e.complexity.Bug.Operations(childComplexity, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int)), true
1147
1148 case "BugConnection.edges":
1149 if e.complexity.BugConnection.Edges == nil {
1150 break
1151 }
1152
1153 return e.complexity.BugConnection.Edges(childComplexity), true
1154
1155 case "BugConnection.nodes":
1156 if e.complexity.BugConnection.Nodes == nil {
1157 break
1158 }
1159
1160 return e.complexity.BugConnection.Nodes(childComplexity), true
1161
1162 case "BugConnection.pageInfo":
1163 if e.complexity.BugConnection.PageInfo == nil {
1164 break
1165 }
1166
1167 return e.complexity.BugConnection.PageInfo(childComplexity), true
1168
1169 case "BugConnection.totalCount":
1170 if e.complexity.BugConnection.TotalCount == nil {
1171 break
1172 }
1173
1174 return e.complexity.BugConnection.TotalCount(childComplexity), true
1175
1176 case "BugEdge.cursor":
1177 if e.complexity.BugEdge.Cursor == nil {
1178 break
1179 }
1180
1181 return e.complexity.BugEdge.Cursor(childComplexity), true
1182
1183 case "BugEdge.node":
1184 if e.complexity.BugEdge.Node == nil {
1185 break
1186 }
1187
1188 return e.complexity.BugEdge.Node(childComplexity), true
1189
1190 case "Comment.author":
1191 if e.complexity.Comment.Author == nil {
1192 break
1193 }
1194
1195 return e.complexity.Comment.Author(childComplexity), true
1196
1197 case "Comment.message":
1198 if e.complexity.Comment.Message == nil {
1199 break
1200 }
1201
1202 return e.complexity.Comment.Message(childComplexity), true
1203
1204 case "Comment.files":
1205 if e.complexity.Comment.Files == nil {
1206 break
1207 }
1208
1209 return e.complexity.Comment.Files(childComplexity), true
1210
1211 case "CommentConnection.edges":
1212 if e.complexity.CommentConnection.Edges == nil {
1213 break
1214 }
1215
1216 return e.complexity.CommentConnection.Edges(childComplexity), true
1217
1218 case "CommentConnection.nodes":
1219 if e.complexity.CommentConnection.Nodes == nil {
1220 break
1221 }
1222
1223 return e.complexity.CommentConnection.Nodes(childComplexity), true
1224
1225 case "CommentConnection.pageInfo":
1226 if e.complexity.CommentConnection.PageInfo == nil {
1227 break
1228 }
1229
1230 return e.complexity.CommentConnection.PageInfo(childComplexity), true
1231
1232 case "CommentConnection.totalCount":
1233 if e.complexity.CommentConnection.TotalCount == nil {
1234 break
1235 }
1236
1237 return e.complexity.CommentConnection.TotalCount(childComplexity), true
1238
1239 case "CommentEdge.cursor":
1240 if e.complexity.CommentEdge.Cursor == nil {
1241 break
1242 }
1243
1244 return e.complexity.CommentEdge.Cursor(childComplexity), true
1245
1246 case "CommentEdge.node":
1247 if e.complexity.CommentEdge.Node == nil {
1248 break
1249 }
1250
1251 return e.complexity.CommentEdge.Node(childComplexity), true
1252
1253 case "CommentHistoryStep.message":
1254 if e.complexity.CommentHistoryStep.Message == nil {
1255 break
1256 }
1257
1258 return e.complexity.CommentHistoryStep.Message(childComplexity), true
1259
1260 case "CommentHistoryStep.date":
1261 if e.complexity.CommentHistoryStep.Date == nil {
1262 break
1263 }
1264
1265 return e.complexity.CommentHistoryStep.Date(childComplexity), true
1266
1267 case "CreateOperation.author":
1268 if e.complexity.CreateOperation.Author == nil {
1269 break
1270 }
1271
1272 return e.complexity.CreateOperation.Author(childComplexity), true
1273
1274 case "CreateOperation.date":
1275 if e.complexity.CreateOperation.Date == nil {
1276 break
1277 }
1278
1279 return e.complexity.CreateOperation.Date(childComplexity), true
1280
1281 case "CreateOperation.title":
1282 if e.complexity.CreateOperation.Title == nil {
1283 break
1284 }
1285
1286 return e.complexity.CreateOperation.Title(childComplexity), true
1287
1288 case "CreateOperation.message":
1289 if e.complexity.CreateOperation.Message == nil {
1290 break
1291 }
1292
1293 return e.complexity.CreateOperation.Message(childComplexity), true
1294
1295 case "CreateOperation.files":
1296 if e.complexity.CreateOperation.Files == nil {
1297 break
1298 }
1299
1300 return e.complexity.CreateOperation.Files(childComplexity), true
1301
1302 case "CreateTimelineItem.hash":
1303 if e.complexity.CreateTimelineItem.Hash == nil {
1304 break
1305 }
1306
1307 return e.complexity.CreateTimelineItem.Hash(childComplexity), true
1308
1309 case "CreateTimelineItem.author":
1310 if e.complexity.CreateTimelineItem.Author == nil {
1311 break
1312 }
1313
1314 return e.complexity.CreateTimelineItem.Author(childComplexity), true
1315
1316 case "CreateTimelineItem.message":
1317 if e.complexity.CreateTimelineItem.Message == nil {
1318 break
1319 }
1320
1321 return e.complexity.CreateTimelineItem.Message(childComplexity), true
1322
1323 case "CreateTimelineItem.files":
1324 if e.complexity.CreateTimelineItem.Files == nil {
1325 break
1326 }
1327
1328 return e.complexity.CreateTimelineItem.Files(childComplexity), true
1329
1330 case "CreateTimelineItem.createdAt":
1331 if e.complexity.CreateTimelineItem.CreatedAt == nil {
1332 break
1333 }
1334
1335 return e.complexity.CreateTimelineItem.CreatedAt(childComplexity), true
1336
1337 case "CreateTimelineItem.lastEdit":
1338 if e.complexity.CreateTimelineItem.LastEdit == nil {
1339 break
1340 }
1341
1342 return e.complexity.CreateTimelineItem.LastEdit(childComplexity), true
1343
1344 case "CreateTimelineItem.edited":
1345 if e.complexity.CreateTimelineItem.Edited == nil {
1346 break
1347 }
1348
1349 return e.complexity.CreateTimelineItem.Edited(childComplexity), true
1350
1351 case "CreateTimelineItem.history":
1352 if e.complexity.CreateTimelineItem.History == nil {
1353 break
1354 }
1355
1356 return e.complexity.CreateTimelineItem.History(childComplexity), true
1357
1358 case "LabelChangeOperation.hash":
1359 if e.complexity.LabelChangeOperation.Hash == nil {
1360 break
1361 }
1362
1363 return e.complexity.LabelChangeOperation.Hash(childComplexity), true
1364
1365 case "LabelChangeOperation.author":
1366 if e.complexity.LabelChangeOperation.Author == nil {
1367 break
1368 }
1369
1370 return e.complexity.LabelChangeOperation.Author(childComplexity), true
1371
1372 case "LabelChangeOperation.date":
1373 if e.complexity.LabelChangeOperation.Date == nil {
1374 break
1375 }
1376
1377 return e.complexity.LabelChangeOperation.Date(childComplexity), true
1378
1379 case "LabelChangeOperation.added":
1380 if e.complexity.LabelChangeOperation.Added == nil {
1381 break
1382 }
1383
1384 return e.complexity.LabelChangeOperation.Added(childComplexity), true
1385
1386 case "LabelChangeOperation.removed":
1387 if e.complexity.LabelChangeOperation.Removed == nil {
1388 break
1389 }
1390
1391 return e.complexity.LabelChangeOperation.Removed(childComplexity), true
1392
1393 case "LabelChangeTimelineItem.hash":
1394 if e.complexity.LabelChangeTimelineItem.Hash == nil {
1395 break
1396 }
1397
1398 return e.complexity.LabelChangeTimelineItem.Hash(childComplexity), true
1399
1400 case "LabelChangeTimelineItem.author":
1401 if e.complexity.LabelChangeTimelineItem.Author == nil {
1402 break
1403 }
1404
1405 return e.complexity.LabelChangeTimelineItem.Author(childComplexity), true
1406
1407 case "LabelChangeTimelineItem.date":
1408 if e.complexity.LabelChangeTimelineItem.Date == nil {
1409 break
1410 }
1411
1412 return e.complexity.LabelChangeTimelineItem.Date(childComplexity), true
1413
1414 case "LabelChangeTimelineItem.added":
1415 if e.complexity.LabelChangeTimelineItem.Added == nil {
1416 break
1417 }
1418
1419 return e.complexity.LabelChangeTimelineItem.Added(childComplexity), true
1420
1421 case "LabelChangeTimelineItem.removed":
1422 if e.complexity.LabelChangeTimelineItem.Removed == nil {
1423 break
1424 }
1425
1426 return e.complexity.LabelChangeTimelineItem.Removed(childComplexity), true
1427
1428 case "Mutation.newBug":
1429 if e.complexity.Mutation.NewBug == nil {
1430 break
1431 }
1432
1433 args, err := field_Mutation_newBug_args(rawArgs)
1434 if err != nil {
1435 return 0, false
1436 }
1437
1438 return e.complexity.Mutation.NewBug(childComplexity, args["repoRef"].(*string), args["title"].(string), args["message"].(string), args["files"].([]git.Hash)), true
1439
1440 case "Mutation.addComment":
1441 if e.complexity.Mutation.AddComment == nil {
1442 break
1443 }
1444
1445 args, err := field_Mutation_addComment_args(rawArgs)
1446 if err != nil {
1447 return 0, false
1448 }
1449
1450 return e.complexity.Mutation.AddComment(childComplexity, args["repoRef"].(*string), args["prefix"].(string), args["message"].(string), args["files"].([]git.Hash)), true
1451
1452 case "Mutation.changeLabels":
1453 if e.complexity.Mutation.ChangeLabels == nil {
1454 break
1455 }
1456
1457 args, err := field_Mutation_changeLabels_args(rawArgs)
1458 if err != nil {
1459 return 0, false
1460 }
1461
1462 return e.complexity.Mutation.ChangeLabels(childComplexity, args["repoRef"].(*string), args["prefix"].(string), args["added"].([]string), args["removed"].([]string)), true
1463
1464 case "Mutation.open":
1465 if e.complexity.Mutation.Open == nil {
1466 break
1467 }
1468
1469 args, err := field_Mutation_open_args(rawArgs)
1470 if err != nil {
1471 return 0, false
1472 }
1473
1474 return e.complexity.Mutation.Open(childComplexity, args["repoRef"].(*string), args["prefix"].(string)), true
1475
1476 case "Mutation.close":
1477 if e.complexity.Mutation.Close == nil {
1478 break
1479 }
1480
1481 args, err := field_Mutation_close_args(rawArgs)
1482 if err != nil {
1483 return 0, false
1484 }
1485
1486 return e.complexity.Mutation.Close(childComplexity, args["repoRef"].(*string), args["prefix"].(string)), true
1487
1488 case "Mutation.setTitle":
1489 if e.complexity.Mutation.SetTitle == nil {
1490 break
1491 }
1492
1493 args, err := field_Mutation_setTitle_args(rawArgs)
1494 if err != nil {
1495 return 0, false
1496 }
1497
1498 return e.complexity.Mutation.SetTitle(childComplexity, args["repoRef"].(*string), args["prefix"].(string), args["title"].(string)), true
1499
1500 case "Mutation.commit":
1501 if e.complexity.Mutation.Commit == nil {
1502 break
1503 }
1504
1505 args, err := field_Mutation_commit_args(rawArgs)
1506 if err != nil {
1507 return 0, false
1508 }
1509
1510 return e.complexity.Mutation.Commit(childComplexity, args["repoRef"].(*string), args["prefix"].(string)), true
1511
1512 case "OperationConnection.edges":
1513 if e.complexity.OperationConnection.Edges == nil {
1514 break
1515 }
1516
1517 return e.complexity.OperationConnection.Edges(childComplexity), true
1518
1519 case "OperationConnection.nodes":
1520 if e.complexity.OperationConnection.Nodes == nil {
1521 break
1522 }
1523
1524 return e.complexity.OperationConnection.Nodes(childComplexity), true
1525
1526 case "OperationConnection.pageInfo":
1527 if e.complexity.OperationConnection.PageInfo == nil {
1528 break
1529 }
1530
1531 return e.complexity.OperationConnection.PageInfo(childComplexity), true
1532
1533 case "OperationConnection.totalCount":
1534 if e.complexity.OperationConnection.TotalCount == nil {
1535 break
1536 }
1537
1538 return e.complexity.OperationConnection.TotalCount(childComplexity), true
1539
1540 case "OperationEdge.cursor":
1541 if e.complexity.OperationEdge.Cursor == nil {
1542 break
1543 }
1544
1545 return e.complexity.OperationEdge.Cursor(childComplexity), true
1546
1547 case "OperationEdge.node":
1548 if e.complexity.OperationEdge.Node == nil {
1549 break
1550 }
1551
1552 return e.complexity.OperationEdge.Node(childComplexity), true
1553
1554 case "PageInfo.hasNextPage":
1555 if e.complexity.PageInfo.HasNextPage == nil {
1556 break
1557 }
1558
1559 return e.complexity.PageInfo.HasNextPage(childComplexity), true
1560
1561 case "PageInfo.hasPreviousPage":
1562 if e.complexity.PageInfo.HasPreviousPage == nil {
1563 break
1564 }
1565
1566 return e.complexity.PageInfo.HasPreviousPage(childComplexity), true
1567
1568 case "PageInfo.startCursor":
1569 if e.complexity.PageInfo.StartCursor == nil {
1570 break
1571 }
1572
1573 return e.complexity.PageInfo.StartCursor(childComplexity), true
1574
1575 case "PageInfo.endCursor":
1576 if e.complexity.PageInfo.EndCursor == nil {
1577 break
1578 }
1579
1580 return e.complexity.PageInfo.EndCursor(childComplexity), true
1581
1582 case "Person.email":
1583 if e.complexity.Person.Email == nil {
1584 break
1585 }
1586
1587 return e.complexity.Person.Email(childComplexity), true
1588
1589 case "Person.name":
1590 if e.complexity.Person.Name == nil {
1591 break
1592 }
1593
1594 return e.complexity.Person.Name(childComplexity), true
1595
1596 case "Person.avatarUrl":
1597 if e.complexity.Person.AvatarUrl == nil {
1598 break
1599 }
1600
1601 return e.complexity.Person.AvatarUrl(childComplexity), true
1602
1603 case "Query.defaultRepository":
1604 if e.complexity.Query.DefaultRepository == nil {
1605 break
1606 }
1607
1608 return e.complexity.Query.DefaultRepository(childComplexity), true
1609
1610 case "Query.repository":
1611 if e.complexity.Query.Repository == nil {
1612 break
1613 }
1614
1615 args, err := field_Query_repository_args(rawArgs)
1616 if err != nil {
1617 return 0, false
1618 }
1619
1620 return e.complexity.Query.Repository(childComplexity, args["id"].(string)), true
1621
1622 case "Repository.allBugs":
1623 if e.complexity.Repository.AllBugs == nil {
1624 break
1625 }
1626
1627 args, err := field_Repository_allBugs_args(rawArgs)
1628 if err != nil {
1629 return 0, false
1630 }
1631
1632 return e.complexity.Repository.AllBugs(childComplexity, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int), args["query"].(*string)), true
1633
1634 case "Repository.bug":
1635 if e.complexity.Repository.Bug == nil {
1636 break
1637 }
1638
1639 args, err := field_Repository_bug_args(rawArgs)
1640 if err != nil {
1641 return 0, false
1642 }
1643
1644 return e.complexity.Repository.Bug(childComplexity, args["prefix"].(string)), true
1645
1646 case "SetStatusOperation.hash":
1647 if e.complexity.SetStatusOperation.Hash == nil {
1648 break
1649 }
1650
1651 return e.complexity.SetStatusOperation.Hash(childComplexity), true
1652
1653 case "SetStatusOperation.author":
1654 if e.complexity.SetStatusOperation.Author == nil {
1655 break
1656 }
1657
1658 return e.complexity.SetStatusOperation.Author(childComplexity), true
1659
1660 case "SetStatusOperation.date":
1661 if e.complexity.SetStatusOperation.Date == nil {
1662 break
1663 }
1664
1665 return e.complexity.SetStatusOperation.Date(childComplexity), true
1666
1667 case "SetStatusOperation.status":
1668 if e.complexity.SetStatusOperation.Status == nil {
1669 break
1670 }
1671
1672 return e.complexity.SetStatusOperation.Status(childComplexity), true
1673
1674 case "SetStatusTimelineItem.hash":
1675 if e.complexity.SetStatusTimelineItem.Hash == nil {
1676 break
1677 }
1678
1679 return e.complexity.SetStatusTimelineItem.Hash(childComplexity), true
1680
1681 case "SetStatusTimelineItem.author":
1682 if e.complexity.SetStatusTimelineItem.Author == nil {
1683 break
1684 }
1685
1686 return e.complexity.SetStatusTimelineItem.Author(childComplexity), true
1687
1688 case "SetStatusTimelineItem.date":
1689 if e.complexity.SetStatusTimelineItem.Date == nil {
1690 break
1691 }
1692
1693 return e.complexity.SetStatusTimelineItem.Date(childComplexity), true
1694
1695 case "SetStatusTimelineItem.status":
1696 if e.complexity.SetStatusTimelineItem.Status == nil {
1697 break
1698 }
1699
1700 return e.complexity.SetStatusTimelineItem.Status(childComplexity), true
1701
1702 case "SetTitleOperation.hash":
1703 if e.complexity.SetTitleOperation.Hash == nil {
1704 break
1705 }
1706
1707 return e.complexity.SetTitleOperation.Hash(childComplexity), true
1708
1709 case "SetTitleOperation.author":
1710 if e.complexity.SetTitleOperation.Author == nil {
1711 break
1712 }
1713
1714 return e.complexity.SetTitleOperation.Author(childComplexity), true
1715
1716 case "SetTitleOperation.date":
1717 if e.complexity.SetTitleOperation.Date == nil {
1718 break
1719 }
1720
1721 return e.complexity.SetTitleOperation.Date(childComplexity), true
1722
1723 case "SetTitleOperation.title":
1724 if e.complexity.SetTitleOperation.Title == nil {
1725 break
1726 }
1727
1728 return e.complexity.SetTitleOperation.Title(childComplexity), true
1729
1730 case "SetTitleOperation.was":
1731 if e.complexity.SetTitleOperation.Was == nil {
1732 break
1733 }
1734
1735 return e.complexity.SetTitleOperation.Was(childComplexity), true
1736
1737 case "SetTitleTimelineItem.hash":
1738 if e.complexity.SetTitleTimelineItem.Hash == nil {
1739 break
1740 }
1741
1742 return e.complexity.SetTitleTimelineItem.Hash(childComplexity), true
1743
1744 case "SetTitleTimelineItem.author":
1745 if e.complexity.SetTitleTimelineItem.Author == nil {
1746 break
1747 }
1748
1749 return e.complexity.SetTitleTimelineItem.Author(childComplexity), true
1750
1751 case "SetTitleTimelineItem.date":
1752 if e.complexity.SetTitleTimelineItem.Date == nil {
1753 break
1754 }
1755
1756 return e.complexity.SetTitleTimelineItem.Date(childComplexity), true
1757
1758 case "SetTitleTimelineItem.title":
1759 if e.complexity.SetTitleTimelineItem.Title == nil {
1760 break
1761 }
1762
1763 return e.complexity.SetTitleTimelineItem.Title(childComplexity), true
1764
1765 case "SetTitleTimelineItem.was":
1766 if e.complexity.SetTitleTimelineItem.Was == nil {
1767 break
1768 }
1769
1770 return e.complexity.SetTitleTimelineItem.Was(childComplexity), true
1771
1772 case "TimelineItemConnection.edges":
1773 if e.complexity.TimelineItemConnection.Edges == nil {
1774 break
1775 }
1776
1777 return e.complexity.TimelineItemConnection.Edges(childComplexity), true
1778
1779 case "TimelineItemConnection.nodes":
1780 if e.complexity.TimelineItemConnection.Nodes == nil {
1781 break
1782 }
1783
1784 return e.complexity.TimelineItemConnection.Nodes(childComplexity), true
1785
1786 case "TimelineItemConnection.pageInfo":
1787 if e.complexity.TimelineItemConnection.PageInfo == nil {
1788 break
1789 }
1790
1791 return e.complexity.TimelineItemConnection.PageInfo(childComplexity), true
1792
1793 case "TimelineItemConnection.totalCount":
1794 if e.complexity.TimelineItemConnection.TotalCount == nil {
1795 break
1796 }
1797
1798 return e.complexity.TimelineItemConnection.TotalCount(childComplexity), true
1799
1800 case "TimelineItemEdge.cursor":
1801 if e.complexity.TimelineItemEdge.Cursor == nil {
1802 break
1803 }
1804
1805 return e.complexity.TimelineItemEdge.Cursor(childComplexity), true
1806
1807 case "TimelineItemEdge.node":
1808 if e.complexity.TimelineItemEdge.Node == nil {
1809 break
1810 }
1811
1812 return e.complexity.TimelineItemEdge.Node(childComplexity), true
1813
1814 }
1815 return 0, false
1816}
1817
1818func (e *executableSchema) Query(ctx context.Context, op *ast.OperationDefinition) *graphql.Response {
1819 ec := executionContext{graphql.GetRequestContext(ctx), e}
1820
1821 buf := ec.RequestMiddleware(ctx, func(ctx context.Context) []byte {
1822 data := ec._Query(ctx, op.SelectionSet)
1823 var buf bytes.Buffer
1824 data.MarshalGQL(&buf)
1825 return buf.Bytes()
1826 })
1827
1828 return &graphql.Response{
1829 Data: buf,
1830 Errors: ec.Errors,
1831 }
1832}
1833
1834func (e *executableSchema) Mutation(ctx context.Context, op *ast.OperationDefinition) *graphql.Response {
1835 ec := executionContext{graphql.GetRequestContext(ctx), e}
1836
1837 buf := ec.RequestMiddleware(ctx, func(ctx context.Context) []byte {
1838 data := ec._Mutation(ctx, op.SelectionSet)
1839 var buf bytes.Buffer
1840 data.MarshalGQL(&buf)
1841 return buf.Bytes()
1842 })
1843
1844 return &graphql.Response{
1845 Data: buf,
1846 Errors: ec.Errors,
1847 }
1848}
1849
1850func (e *executableSchema) Subscription(ctx context.Context, op *ast.OperationDefinition) func() *graphql.Response {
1851 return graphql.OneShot(graphql.ErrorResponse(ctx, "subscriptions are not supported"))
1852}
1853
1854type executionContext struct {
1855 *graphql.RequestContext
1856 *executableSchema
1857}
1858
1859var addCommentOperationImplementors = []string{"AddCommentOperation", "Operation", "Authored"}
1860
1861// nolint: gocyclo, errcheck, gas, goconst
1862func (ec *executionContext) _AddCommentOperation(ctx context.Context, sel ast.SelectionSet, obj *bug.AddCommentOperation) graphql.Marshaler {
1863 fields := graphql.CollectFields(ctx, sel, addCommentOperationImplementors)
1864
1865 var wg sync.WaitGroup
1866 out := graphql.NewOrderedMap(len(fields))
1867 invalid := false
1868 for i, field := range fields {
1869 out.Keys[i] = field.Alias
1870
1871 switch field.Name {
1872 case "__typename":
1873 out.Values[i] = graphql.MarshalString("AddCommentOperation")
1874 case "author":
1875 out.Values[i] = ec._AddCommentOperation_author(ctx, field, obj)
1876 if out.Values[i] == graphql.Null {
1877 invalid = true
1878 }
1879 case "date":
1880 wg.Add(1)
1881 go func(i int, field graphql.CollectedField) {
1882 out.Values[i] = ec._AddCommentOperation_date(ctx, field, obj)
1883 if out.Values[i] == graphql.Null {
1884 invalid = true
1885 }
1886 wg.Done()
1887 }(i, field)
1888 case "message":
1889 out.Values[i] = ec._AddCommentOperation_message(ctx, field, obj)
1890 if out.Values[i] == graphql.Null {
1891 invalid = true
1892 }
1893 case "files":
1894 out.Values[i] = ec._AddCommentOperation_files(ctx, field, obj)
1895 if out.Values[i] == graphql.Null {
1896 invalid = true
1897 }
1898 default:
1899 panic("unknown field " + strconv.Quote(field.Name))
1900 }
1901 }
1902 wg.Wait()
1903 if invalid {
1904 return graphql.Null
1905 }
1906 return out
1907}
1908
1909// nolint: vetshadow
1910func (ec *executionContext) _AddCommentOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) graphql.Marshaler {
1911 rctx := &graphql.ResolverContext{
1912 Object: "AddCommentOperation",
1913 Args: nil,
1914 Field: field,
1915 }
1916 ctx = graphql.WithResolverContext(ctx, rctx)
1917 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
1918 return obj.Author, nil
1919 })
1920 if resTmp == nil {
1921 if !ec.HasError(rctx) {
1922 ec.Errorf(ctx, "must not be null")
1923 }
1924 return graphql.Null
1925 }
1926 res := resTmp.(bug.Person)
1927 rctx.Result = res
1928
1929 return ec._Person(ctx, field.Selections, &res)
1930}
1931
1932// nolint: vetshadow
1933func (ec *executionContext) _AddCommentOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) graphql.Marshaler {
1934 rctx := &graphql.ResolverContext{
1935 Object: "AddCommentOperation",
1936 Args: nil,
1937 Field: field,
1938 }
1939 ctx = graphql.WithResolverContext(ctx, rctx)
1940 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
1941 return ec.resolvers.AddCommentOperation().Date(ctx, obj)
1942 })
1943 if resTmp == nil {
1944 if !ec.HasError(rctx) {
1945 ec.Errorf(ctx, "must not be null")
1946 }
1947 return graphql.Null
1948 }
1949 res := resTmp.(time.Time)
1950 rctx.Result = res
1951 return graphql.MarshalTime(res)
1952}
1953
1954// nolint: vetshadow
1955func (ec *executionContext) _AddCommentOperation_message(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) graphql.Marshaler {
1956 rctx := &graphql.ResolverContext{
1957 Object: "AddCommentOperation",
1958 Args: nil,
1959 Field: field,
1960 }
1961 ctx = graphql.WithResolverContext(ctx, rctx)
1962 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
1963 return obj.Message, nil
1964 })
1965 if resTmp == nil {
1966 if !ec.HasError(rctx) {
1967 ec.Errorf(ctx, "must not be null")
1968 }
1969 return graphql.Null
1970 }
1971 res := resTmp.(string)
1972 rctx.Result = res
1973 return graphql.MarshalString(res)
1974}
1975
1976// nolint: vetshadow
1977func (ec *executionContext) _AddCommentOperation_files(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) graphql.Marshaler {
1978 rctx := &graphql.ResolverContext{
1979 Object: "AddCommentOperation",
1980 Args: nil,
1981 Field: field,
1982 }
1983 ctx = graphql.WithResolverContext(ctx, rctx)
1984 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
1985 return obj.Files, nil
1986 })
1987 if resTmp == nil {
1988 if !ec.HasError(rctx) {
1989 ec.Errorf(ctx, "must not be null")
1990 }
1991 return graphql.Null
1992 }
1993 res := resTmp.([]git.Hash)
1994 rctx.Result = res
1995
1996 arr1 := make(graphql.Array, len(res))
1997
1998 for idx1 := range res {
1999 arr1[idx1] = func() graphql.Marshaler {
2000 return res[idx1]
2001 }()
2002 }
2003
2004 return arr1
2005}
2006
2007var addCommentTimelineItemImplementors = []string{"AddCommentTimelineItem", "TimelineItem"}
2008
2009// nolint: gocyclo, errcheck, gas, goconst
2010func (ec *executionContext) _AddCommentTimelineItem(ctx context.Context, sel ast.SelectionSet, obj *bug.AddCommentTimelineItem) graphql.Marshaler {
2011 fields := graphql.CollectFields(ctx, sel, addCommentTimelineItemImplementors)
2012
2013 var wg sync.WaitGroup
2014 out := graphql.NewOrderedMap(len(fields))
2015 invalid := false
2016 for i, field := range fields {
2017 out.Keys[i] = field.Alias
2018
2019 switch field.Name {
2020 case "__typename":
2021 out.Values[i] = graphql.MarshalString("AddCommentTimelineItem")
2022 case "hash":
2023 out.Values[i] = ec._AddCommentTimelineItem_hash(ctx, field, obj)
2024 if out.Values[i] == graphql.Null {
2025 invalid = true
2026 }
2027 case "author":
2028 out.Values[i] = ec._AddCommentTimelineItem_author(ctx, field, obj)
2029 if out.Values[i] == graphql.Null {
2030 invalid = true
2031 }
2032 case "message":
2033 out.Values[i] = ec._AddCommentTimelineItem_message(ctx, field, obj)
2034 if out.Values[i] == graphql.Null {
2035 invalid = true
2036 }
2037 case "files":
2038 out.Values[i] = ec._AddCommentTimelineItem_files(ctx, field, obj)
2039 if out.Values[i] == graphql.Null {
2040 invalid = true
2041 }
2042 case "createdAt":
2043 wg.Add(1)
2044 go func(i int, field graphql.CollectedField) {
2045 out.Values[i] = ec._AddCommentTimelineItem_createdAt(ctx, field, obj)
2046 if out.Values[i] == graphql.Null {
2047 invalid = true
2048 }
2049 wg.Done()
2050 }(i, field)
2051 case "lastEdit":
2052 wg.Add(1)
2053 go func(i int, field graphql.CollectedField) {
2054 out.Values[i] = ec._AddCommentTimelineItem_lastEdit(ctx, field, obj)
2055 if out.Values[i] == graphql.Null {
2056 invalid = true
2057 }
2058 wg.Done()
2059 }(i, field)
2060 case "edited":
2061 out.Values[i] = ec._AddCommentTimelineItem_edited(ctx, field, obj)
2062 if out.Values[i] == graphql.Null {
2063 invalid = true
2064 }
2065 case "history":
2066 out.Values[i] = ec._AddCommentTimelineItem_history(ctx, field, obj)
2067 if out.Values[i] == graphql.Null {
2068 invalid = true
2069 }
2070 default:
2071 panic("unknown field " + strconv.Quote(field.Name))
2072 }
2073 }
2074 wg.Wait()
2075 if invalid {
2076 return graphql.Null
2077 }
2078 return out
2079}
2080
2081// nolint: vetshadow
2082func (ec *executionContext) _AddCommentTimelineItem_hash(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler {
2083 rctx := &graphql.ResolverContext{
2084 Object: "AddCommentTimelineItem",
2085 Args: nil,
2086 Field: field,
2087 }
2088 ctx = graphql.WithResolverContext(ctx, rctx)
2089 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
2090 return obj.Hash(), nil
2091 })
2092 if resTmp == nil {
2093 if !ec.HasError(rctx) {
2094 ec.Errorf(ctx, "must not be null")
2095 }
2096 return graphql.Null
2097 }
2098 res := resTmp.(git.Hash)
2099 rctx.Result = res
2100 return res
2101}
2102
2103// nolint: vetshadow
2104func (ec *executionContext) _AddCommentTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler {
2105 rctx := &graphql.ResolverContext{
2106 Object: "AddCommentTimelineItem",
2107 Args: nil,
2108 Field: field,
2109 }
2110 ctx = graphql.WithResolverContext(ctx, rctx)
2111 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
2112 return obj.Author, nil
2113 })
2114 if resTmp == nil {
2115 if !ec.HasError(rctx) {
2116 ec.Errorf(ctx, "must not be null")
2117 }
2118 return graphql.Null
2119 }
2120 res := resTmp.(bug.Person)
2121 rctx.Result = res
2122
2123 return ec._Person(ctx, field.Selections, &res)
2124}
2125
2126// nolint: vetshadow
2127func (ec *executionContext) _AddCommentTimelineItem_message(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler {
2128 rctx := &graphql.ResolverContext{
2129 Object: "AddCommentTimelineItem",
2130 Args: nil,
2131 Field: field,
2132 }
2133 ctx = graphql.WithResolverContext(ctx, rctx)
2134 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
2135 return obj.Message, nil
2136 })
2137 if resTmp == nil {
2138 if !ec.HasError(rctx) {
2139 ec.Errorf(ctx, "must not be null")
2140 }
2141 return graphql.Null
2142 }
2143 res := resTmp.(string)
2144 rctx.Result = res
2145 return graphql.MarshalString(res)
2146}
2147
2148// nolint: vetshadow
2149func (ec *executionContext) _AddCommentTimelineItem_files(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler {
2150 rctx := &graphql.ResolverContext{
2151 Object: "AddCommentTimelineItem",
2152 Args: nil,
2153 Field: field,
2154 }
2155 ctx = graphql.WithResolverContext(ctx, rctx)
2156 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
2157 return obj.Files, nil
2158 })
2159 if resTmp == nil {
2160 if !ec.HasError(rctx) {
2161 ec.Errorf(ctx, "must not be null")
2162 }
2163 return graphql.Null
2164 }
2165 res := resTmp.([]git.Hash)
2166 rctx.Result = res
2167
2168 arr1 := make(graphql.Array, len(res))
2169
2170 for idx1 := range res {
2171 arr1[idx1] = func() graphql.Marshaler {
2172 return res[idx1]
2173 }()
2174 }
2175
2176 return arr1
2177}
2178
2179// nolint: vetshadow
2180func (ec *executionContext) _AddCommentTimelineItem_createdAt(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler {
2181 rctx := &graphql.ResolverContext{
2182 Object: "AddCommentTimelineItem",
2183 Args: nil,
2184 Field: field,
2185 }
2186 ctx = graphql.WithResolverContext(ctx, rctx)
2187 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
2188 return ec.resolvers.AddCommentTimelineItem().CreatedAt(ctx, obj)
2189 })
2190 if resTmp == nil {
2191 if !ec.HasError(rctx) {
2192 ec.Errorf(ctx, "must not be null")
2193 }
2194 return graphql.Null
2195 }
2196 res := resTmp.(time.Time)
2197 rctx.Result = res
2198 return graphql.MarshalTime(res)
2199}
2200
2201// nolint: vetshadow
2202func (ec *executionContext) _AddCommentTimelineItem_lastEdit(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler {
2203 rctx := &graphql.ResolverContext{
2204 Object: "AddCommentTimelineItem",
2205 Args: nil,
2206 Field: field,
2207 }
2208 ctx = graphql.WithResolverContext(ctx, rctx)
2209 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
2210 return ec.resolvers.AddCommentTimelineItem().LastEdit(ctx, obj)
2211 })
2212 if resTmp == nil {
2213 if !ec.HasError(rctx) {
2214 ec.Errorf(ctx, "must not be null")
2215 }
2216 return graphql.Null
2217 }
2218 res := resTmp.(time.Time)
2219 rctx.Result = res
2220 return graphql.MarshalTime(res)
2221}
2222
2223// nolint: vetshadow
2224func (ec *executionContext) _AddCommentTimelineItem_edited(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler {
2225 rctx := &graphql.ResolverContext{
2226 Object: "AddCommentTimelineItem",
2227 Args: nil,
2228 Field: field,
2229 }
2230 ctx = graphql.WithResolverContext(ctx, rctx)
2231 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
2232 return obj.Edited(), nil
2233 })
2234 if resTmp == nil {
2235 if !ec.HasError(rctx) {
2236 ec.Errorf(ctx, "must not be null")
2237 }
2238 return graphql.Null
2239 }
2240 res := resTmp.(bool)
2241 rctx.Result = res
2242 return graphql.MarshalBoolean(res)
2243}
2244
2245// nolint: vetshadow
2246func (ec *executionContext) _AddCommentTimelineItem_history(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler {
2247 rctx := &graphql.ResolverContext{
2248 Object: "AddCommentTimelineItem",
2249 Args: nil,
2250 Field: field,
2251 }
2252 ctx = graphql.WithResolverContext(ctx, rctx)
2253 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
2254 return obj.History, nil
2255 })
2256 if resTmp == nil {
2257 if !ec.HasError(rctx) {
2258 ec.Errorf(ctx, "must not be null")
2259 }
2260 return graphql.Null
2261 }
2262 res := resTmp.([]bug.CommentHistoryStep)
2263 rctx.Result = res
2264
2265 arr1 := make(graphql.Array, len(res))
2266 var wg sync.WaitGroup
2267
2268 isLen1 := len(res) == 1
2269 if !isLen1 {
2270 wg.Add(len(res))
2271 }
2272
2273 for idx1 := range res {
2274 idx1 := idx1
2275 rctx := &graphql.ResolverContext{
2276 Index: &idx1,
2277 Result: &res[idx1],
2278 }
2279 ctx := graphql.WithResolverContext(ctx, rctx)
2280 f := func(idx1 int) {
2281 if !isLen1 {
2282 defer wg.Done()
2283 }
2284 arr1[idx1] = func() graphql.Marshaler {
2285
2286 return ec._CommentHistoryStep(ctx, field.Selections, &res[idx1])
2287 }()
2288 }
2289 if isLen1 {
2290 f(idx1)
2291 } else {
2292 go f(idx1)
2293 }
2294
2295 }
2296 wg.Wait()
2297 return arr1
2298}
2299
2300var bugImplementors = []string{"Bug"}
2301
2302// nolint: gocyclo, errcheck, gas, goconst
2303func (ec *executionContext) _Bug(ctx context.Context, sel ast.SelectionSet, obj *bug.Snapshot) graphql.Marshaler {
2304 fields := graphql.CollectFields(ctx, sel, bugImplementors)
2305
2306 var wg sync.WaitGroup
2307 out := graphql.NewOrderedMap(len(fields))
2308 invalid := false
2309 for i, field := range fields {
2310 out.Keys[i] = field.Alias
2311
2312 switch field.Name {
2313 case "__typename":
2314 out.Values[i] = graphql.MarshalString("Bug")
2315 case "id":
2316 out.Values[i] = ec._Bug_id(ctx, field, obj)
2317 if out.Values[i] == graphql.Null {
2318 invalid = true
2319 }
2320 case "humanId":
2321 out.Values[i] = ec._Bug_humanId(ctx, field, obj)
2322 if out.Values[i] == graphql.Null {
2323 invalid = true
2324 }
2325 case "status":
2326 wg.Add(1)
2327 go func(i int, field graphql.CollectedField) {
2328 out.Values[i] = ec._Bug_status(ctx, field, obj)
2329 if out.Values[i] == graphql.Null {
2330 invalid = true
2331 }
2332 wg.Done()
2333 }(i, field)
2334 case "title":
2335 out.Values[i] = ec._Bug_title(ctx, field, obj)
2336 if out.Values[i] == graphql.Null {
2337 invalid = true
2338 }
2339 case "labels":
2340 out.Values[i] = ec._Bug_labels(ctx, field, obj)
2341 if out.Values[i] == graphql.Null {
2342 invalid = true
2343 }
2344 case "author":
2345 out.Values[i] = ec._Bug_author(ctx, field, obj)
2346 if out.Values[i] == graphql.Null {
2347 invalid = true
2348 }
2349 case "createdAt":
2350 out.Values[i] = ec._Bug_createdAt(ctx, field, obj)
2351 if out.Values[i] == graphql.Null {
2352 invalid = true
2353 }
2354 case "lastEdit":
2355 wg.Add(1)
2356 go func(i int, field graphql.CollectedField) {
2357 out.Values[i] = ec._Bug_lastEdit(ctx, field, obj)
2358 if out.Values[i] == graphql.Null {
2359 invalid = true
2360 }
2361 wg.Done()
2362 }(i, field)
2363 case "comments":
2364 wg.Add(1)
2365 go func(i int, field graphql.CollectedField) {
2366 out.Values[i] = ec._Bug_comments(ctx, field, obj)
2367 if out.Values[i] == graphql.Null {
2368 invalid = true
2369 }
2370 wg.Done()
2371 }(i, field)
2372 case "timeline":
2373 wg.Add(1)
2374 go func(i int, field graphql.CollectedField) {
2375 out.Values[i] = ec._Bug_timeline(ctx, field, obj)
2376 if out.Values[i] == graphql.Null {
2377 invalid = true
2378 }
2379 wg.Done()
2380 }(i, field)
2381 case "operations":
2382 wg.Add(1)
2383 go func(i int, field graphql.CollectedField) {
2384 out.Values[i] = ec._Bug_operations(ctx, field, obj)
2385 if out.Values[i] == graphql.Null {
2386 invalid = true
2387 }
2388 wg.Done()
2389 }(i, field)
2390 default:
2391 panic("unknown field " + strconv.Quote(field.Name))
2392 }
2393 }
2394 wg.Wait()
2395 if invalid {
2396 return graphql.Null
2397 }
2398 return out
2399}
2400
2401// nolint: vetshadow
2402func (ec *executionContext) _Bug_id(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
2403 rctx := &graphql.ResolverContext{
2404 Object: "Bug",
2405 Args: nil,
2406 Field: field,
2407 }
2408 ctx = graphql.WithResolverContext(ctx, rctx)
2409 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
2410 return obj.Id(), nil
2411 })
2412 if resTmp == nil {
2413 if !ec.HasError(rctx) {
2414 ec.Errorf(ctx, "must not be null")
2415 }
2416 return graphql.Null
2417 }
2418 res := resTmp.(string)
2419 rctx.Result = res
2420 return graphql.MarshalString(res)
2421}
2422
2423// nolint: vetshadow
2424func (ec *executionContext) _Bug_humanId(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
2425 rctx := &graphql.ResolverContext{
2426 Object: "Bug",
2427 Args: nil,
2428 Field: field,
2429 }
2430 ctx = graphql.WithResolverContext(ctx, rctx)
2431 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
2432 return obj.HumanId(), nil
2433 })
2434 if resTmp == nil {
2435 if !ec.HasError(rctx) {
2436 ec.Errorf(ctx, "must not be null")
2437 }
2438 return graphql.Null
2439 }
2440 res := resTmp.(string)
2441 rctx.Result = res
2442 return graphql.MarshalString(res)
2443}
2444
2445// nolint: vetshadow
2446func (ec *executionContext) _Bug_status(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
2447 rctx := &graphql.ResolverContext{
2448 Object: "Bug",
2449 Args: nil,
2450 Field: field,
2451 }
2452 ctx = graphql.WithResolverContext(ctx, rctx)
2453 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
2454 return ec.resolvers.Bug().Status(ctx, obj)
2455 })
2456 if resTmp == nil {
2457 if !ec.HasError(rctx) {
2458 ec.Errorf(ctx, "must not be null")
2459 }
2460 return graphql.Null
2461 }
2462 res := resTmp.(models.Status)
2463 rctx.Result = res
2464 return res
2465}
2466
2467// nolint: vetshadow
2468func (ec *executionContext) _Bug_title(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
2469 rctx := &graphql.ResolverContext{
2470 Object: "Bug",
2471 Args: nil,
2472 Field: field,
2473 }
2474 ctx = graphql.WithResolverContext(ctx, rctx)
2475 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
2476 return obj.Title, nil
2477 })
2478 if resTmp == nil {
2479 if !ec.HasError(rctx) {
2480 ec.Errorf(ctx, "must not be null")
2481 }
2482 return graphql.Null
2483 }
2484 res := resTmp.(string)
2485 rctx.Result = res
2486 return graphql.MarshalString(res)
2487}
2488
2489// nolint: vetshadow
2490func (ec *executionContext) _Bug_labels(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
2491 rctx := &graphql.ResolverContext{
2492 Object: "Bug",
2493 Args: nil,
2494 Field: field,
2495 }
2496 ctx = graphql.WithResolverContext(ctx, rctx)
2497 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
2498 return obj.Labels, nil
2499 })
2500 if resTmp == nil {
2501 if !ec.HasError(rctx) {
2502 ec.Errorf(ctx, "must not be null")
2503 }
2504 return graphql.Null
2505 }
2506 res := resTmp.([]bug.Label)
2507 rctx.Result = res
2508
2509 arr1 := make(graphql.Array, len(res))
2510
2511 for idx1 := range res {
2512 arr1[idx1] = func() graphql.Marshaler {
2513 return res[idx1]
2514 }()
2515 }
2516
2517 return arr1
2518}
2519
2520// nolint: vetshadow
2521func (ec *executionContext) _Bug_author(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
2522 rctx := &graphql.ResolverContext{
2523 Object: "Bug",
2524 Args: nil,
2525 Field: field,
2526 }
2527 ctx = graphql.WithResolverContext(ctx, rctx)
2528 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
2529 return obj.Author, nil
2530 })
2531 if resTmp == nil {
2532 if !ec.HasError(rctx) {
2533 ec.Errorf(ctx, "must not be null")
2534 }
2535 return graphql.Null
2536 }
2537 res := resTmp.(bug.Person)
2538 rctx.Result = res
2539
2540 return ec._Person(ctx, field.Selections, &res)
2541}
2542
2543// nolint: vetshadow
2544func (ec *executionContext) _Bug_createdAt(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
2545 rctx := &graphql.ResolverContext{
2546 Object: "Bug",
2547 Args: nil,
2548 Field: field,
2549 }
2550 ctx = graphql.WithResolverContext(ctx, rctx)
2551 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
2552 return obj.CreatedAt, nil
2553 })
2554 if resTmp == nil {
2555 if !ec.HasError(rctx) {
2556 ec.Errorf(ctx, "must not be null")
2557 }
2558 return graphql.Null
2559 }
2560 res := resTmp.(time.Time)
2561 rctx.Result = res
2562 return graphql.MarshalTime(res)
2563}
2564
2565// nolint: vetshadow
2566func (ec *executionContext) _Bug_lastEdit(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
2567 rctx := &graphql.ResolverContext{
2568 Object: "Bug",
2569 Args: nil,
2570 Field: field,
2571 }
2572 ctx = graphql.WithResolverContext(ctx, rctx)
2573 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
2574 return ec.resolvers.Bug().LastEdit(ctx, obj)
2575 })
2576 if resTmp == nil {
2577 if !ec.HasError(rctx) {
2578 ec.Errorf(ctx, "must not be null")
2579 }
2580 return graphql.Null
2581 }
2582 res := resTmp.(time.Time)
2583 rctx.Result = res
2584 return graphql.MarshalTime(res)
2585}
2586
2587// nolint: vetshadow
2588func (ec *executionContext) _Bug_comments(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
2589 rawArgs := field.ArgumentMap(ec.Variables)
2590 args, err := field_Bug_comments_args(rawArgs)
2591 if err != nil {
2592 ec.Error(ctx, err)
2593 return graphql.Null
2594 }
2595 rctx := &graphql.ResolverContext{
2596 Object: "Bug",
2597 Args: args,
2598 Field: field,
2599 }
2600 ctx = graphql.WithResolverContext(ctx, rctx)
2601 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
2602 return ec.resolvers.Bug().Comments(ctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int))
2603 })
2604 if resTmp == nil {
2605 if !ec.HasError(rctx) {
2606 ec.Errorf(ctx, "must not be null")
2607 }
2608 return graphql.Null
2609 }
2610 res := resTmp.(models.CommentConnection)
2611 rctx.Result = res
2612
2613 return ec._CommentConnection(ctx, field.Selections, &res)
2614}
2615
2616// nolint: vetshadow
2617func (ec *executionContext) _Bug_timeline(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
2618 rawArgs := field.ArgumentMap(ec.Variables)
2619 args, err := field_Bug_timeline_args(rawArgs)
2620 if err != nil {
2621 ec.Error(ctx, err)
2622 return graphql.Null
2623 }
2624 rctx := &graphql.ResolverContext{
2625 Object: "Bug",
2626 Args: args,
2627 Field: field,
2628 }
2629 ctx = graphql.WithResolverContext(ctx, rctx)
2630 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
2631 return ec.resolvers.Bug().Timeline(ctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int))
2632 })
2633 if resTmp == nil {
2634 if !ec.HasError(rctx) {
2635 ec.Errorf(ctx, "must not be null")
2636 }
2637 return graphql.Null
2638 }
2639 res := resTmp.(models.TimelineItemConnection)
2640 rctx.Result = res
2641
2642 return ec._TimelineItemConnection(ctx, field.Selections, &res)
2643}
2644
2645// nolint: vetshadow
2646func (ec *executionContext) _Bug_operations(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
2647 rawArgs := field.ArgumentMap(ec.Variables)
2648 args, err := field_Bug_operations_args(rawArgs)
2649 if err != nil {
2650 ec.Error(ctx, err)
2651 return graphql.Null
2652 }
2653 rctx := &graphql.ResolverContext{
2654 Object: "Bug",
2655 Args: args,
2656 Field: field,
2657 }
2658 ctx = graphql.WithResolverContext(ctx, rctx)
2659 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
2660 return ec.resolvers.Bug().Operations(ctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int))
2661 })
2662 if resTmp == nil {
2663 if !ec.HasError(rctx) {
2664 ec.Errorf(ctx, "must not be null")
2665 }
2666 return graphql.Null
2667 }
2668 res := resTmp.(models.OperationConnection)
2669 rctx.Result = res
2670
2671 return ec._OperationConnection(ctx, field.Selections, &res)
2672}
2673
2674var bugConnectionImplementors = []string{"BugConnection"}
2675
2676// nolint: gocyclo, errcheck, gas, goconst
2677func (ec *executionContext) _BugConnection(ctx context.Context, sel ast.SelectionSet, obj *models.BugConnection) graphql.Marshaler {
2678 fields := graphql.CollectFields(ctx, sel, bugConnectionImplementors)
2679
2680 out := graphql.NewOrderedMap(len(fields))
2681 invalid := false
2682 for i, field := range fields {
2683 out.Keys[i] = field.Alias
2684
2685 switch field.Name {
2686 case "__typename":
2687 out.Values[i] = graphql.MarshalString("BugConnection")
2688 case "edges":
2689 out.Values[i] = ec._BugConnection_edges(ctx, field, obj)
2690 if out.Values[i] == graphql.Null {
2691 invalid = true
2692 }
2693 case "nodes":
2694 out.Values[i] = ec._BugConnection_nodes(ctx, field, obj)
2695 if out.Values[i] == graphql.Null {
2696 invalid = true
2697 }
2698 case "pageInfo":
2699 out.Values[i] = ec._BugConnection_pageInfo(ctx, field, obj)
2700 if out.Values[i] == graphql.Null {
2701 invalid = true
2702 }
2703 case "totalCount":
2704 out.Values[i] = ec._BugConnection_totalCount(ctx, field, obj)
2705 if out.Values[i] == graphql.Null {
2706 invalid = true
2707 }
2708 default:
2709 panic("unknown field " + strconv.Quote(field.Name))
2710 }
2711 }
2712
2713 if invalid {
2714 return graphql.Null
2715 }
2716 return out
2717}
2718
2719// nolint: vetshadow
2720func (ec *executionContext) _BugConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) graphql.Marshaler {
2721 rctx := &graphql.ResolverContext{
2722 Object: "BugConnection",
2723 Args: nil,
2724 Field: field,
2725 }
2726 ctx = graphql.WithResolverContext(ctx, rctx)
2727 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
2728 return obj.Edges, nil
2729 })
2730 if resTmp == nil {
2731 if !ec.HasError(rctx) {
2732 ec.Errorf(ctx, "must not be null")
2733 }
2734 return graphql.Null
2735 }
2736 res := resTmp.([]models.BugEdge)
2737 rctx.Result = res
2738
2739 arr1 := make(graphql.Array, len(res))
2740 var wg sync.WaitGroup
2741
2742 isLen1 := len(res) == 1
2743 if !isLen1 {
2744 wg.Add(len(res))
2745 }
2746
2747 for idx1 := range res {
2748 idx1 := idx1
2749 rctx := &graphql.ResolverContext{
2750 Index: &idx1,
2751 Result: &res[idx1],
2752 }
2753 ctx := graphql.WithResolverContext(ctx, rctx)
2754 f := func(idx1 int) {
2755 if !isLen1 {
2756 defer wg.Done()
2757 }
2758 arr1[idx1] = func() graphql.Marshaler {
2759
2760 return ec._BugEdge(ctx, field.Selections, &res[idx1])
2761 }()
2762 }
2763 if isLen1 {
2764 f(idx1)
2765 } else {
2766 go f(idx1)
2767 }
2768
2769 }
2770 wg.Wait()
2771 return arr1
2772}
2773
2774// nolint: vetshadow
2775func (ec *executionContext) _BugConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) graphql.Marshaler {
2776 rctx := &graphql.ResolverContext{
2777 Object: "BugConnection",
2778 Args: nil,
2779 Field: field,
2780 }
2781 ctx = graphql.WithResolverContext(ctx, rctx)
2782 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
2783 return obj.Nodes, nil
2784 })
2785 if resTmp == nil {
2786 if !ec.HasError(rctx) {
2787 ec.Errorf(ctx, "must not be null")
2788 }
2789 return graphql.Null
2790 }
2791 res := resTmp.([]bug.Snapshot)
2792 rctx.Result = res
2793
2794 arr1 := make(graphql.Array, len(res))
2795 var wg sync.WaitGroup
2796
2797 isLen1 := len(res) == 1
2798 if !isLen1 {
2799 wg.Add(len(res))
2800 }
2801
2802 for idx1 := range res {
2803 idx1 := idx1
2804 rctx := &graphql.ResolverContext{
2805 Index: &idx1,
2806 Result: &res[idx1],
2807 }
2808 ctx := graphql.WithResolverContext(ctx, rctx)
2809 f := func(idx1 int) {
2810 if !isLen1 {
2811 defer wg.Done()
2812 }
2813 arr1[idx1] = func() graphql.Marshaler {
2814
2815 return ec._Bug(ctx, field.Selections, &res[idx1])
2816 }()
2817 }
2818 if isLen1 {
2819 f(idx1)
2820 } else {
2821 go f(idx1)
2822 }
2823
2824 }
2825 wg.Wait()
2826 return arr1
2827}
2828
2829// nolint: vetshadow
2830func (ec *executionContext) _BugConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) graphql.Marshaler {
2831 rctx := &graphql.ResolverContext{
2832 Object: "BugConnection",
2833 Args: nil,
2834 Field: field,
2835 }
2836 ctx = graphql.WithResolverContext(ctx, rctx)
2837 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
2838 return obj.PageInfo, nil
2839 })
2840 if resTmp == nil {
2841 if !ec.HasError(rctx) {
2842 ec.Errorf(ctx, "must not be null")
2843 }
2844 return graphql.Null
2845 }
2846 res := resTmp.(models.PageInfo)
2847 rctx.Result = res
2848
2849 return ec._PageInfo(ctx, field.Selections, &res)
2850}
2851
2852// nolint: vetshadow
2853func (ec *executionContext) _BugConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) graphql.Marshaler {
2854 rctx := &graphql.ResolverContext{
2855 Object: "BugConnection",
2856 Args: nil,
2857 Field: field,
2858 }
2859 ctx = graphql.WithResolverContext(ctx, rctx)
2860 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
2861 return obj.TotalCount, nil
2862 })
2863 if resTmp == nil {
2864 if !ec.HasError(rctx) {
2865 ec.Errorf(ctx, "must not be null")
2866 }
2867 return graphql.Null
2868 }
2869 res := resTmp.(int)
2870 rctx.Result = res
2871 return graphql.MarshalInt(res)
2872}
2873
2874var bugEdgeImplementors = []string{"BugEdge"}
2875
2876// nolint: gocyclo, errcheck, gas, goconst
2877func (ec *executionContext) _BugEdge(ctx context.Context, sel ast.SelectionSet, obj *models.BugEdge) graphql.Marshaler {
2878 fields := graphql.CollectFields(ctx, sel, bugEdgeImplementors)
2879
2880 out := graphql.NewOrderedMap(len(fields))
2881 invalid := false
2882 for i, field := range fields {
2883 out.Keys[i] = field.Alias
2884
2885 switch field.Name {
2886 case "__typename":
2887 out.Values[i] = graphql.MarshalString("BugEdge")
2888 case "cursor":
2889 out.Values[i] = ec._BugEdge_cursor(ctx, field, obj)
2890 if out.Values[i] == graphql.Null {
2891 invalid = true
2892 }
2893 case "node":
2894 out.Values[i] = ec._BugEdge_node(ctx, field, obj)
2895 if out.Values[i] == graphql.Null {
2896 invalid = true
2897 }
2898 default:
2899 panic("unknown field " + strconv.Quote(field.Name))
2900 }
2901 }
2902
2903 if invalid {
2904 return graphql.Null
2905 }
2906 return out
2907}
2908
2909// nolint: vetshadow
2910func (ec *executionContext) _BugEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.BugEdge) graphql.Marshaler {
2911 rctx := &graphql.ResolverContext{
2912 Object: "BugEdge",
2913 Args: nil,
2914 Field: field,
2915 }
2916 ctx = graphql.WithResolverContext(ctx, rctx)
2917 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
2918 return obj.Cursor, nil
2919 })
2920 if resTmp == nil {
2921 if !ec.HasError(rctx) {
2922 ec.Errorf(ctx, "must not be null")
2923 }
2924 return graphql.Null
2925 }
2926 res := resTmp.(string)
2927 rctx.Result = res
2928 return graphql.MarshalString(res)
2929}
2930
2931// nolint: vetshadow
2932func (ec *executionContext) _BugEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.BugEdge) graphql.Marshaler {
2933 rctx := &graphql.ResolverContext{
2934 Object: "BugEdge",
2935 Args: nil,
2936 Field: field,
2937 }
2938 ctx = graphql.WithResolverContext(ctx, rctx)
2939 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
2940 return obj.Node, nil
2941 })
2942 if resTmp == nil {
2943 if !ec.HasError(rctx) {
2944 ec.Errorf(ctx, "must not be null")
2945 }
2946 return graphql.Null
2947 }
2948 res := resTmp.(bug.Snapshot)
2949 rctx.Result = res
2950
2951 return ec._Bug(ctx, field.Selections, &res)
2952}
2953
2954var commentImplementors = []string{"Comment", "Authored"}
2955
2956// nolint: gocyclo, errcheck, gas, goconst
2957func (ec *executionContext) _Comment(ctx context.Context, sel ast.SelectionSet, obj *bug.Comment) graphql.Marshaler {
2958 fields := graphql.CollectFields(ctx, sel, commentImplementors)
2959
2960 out := graphql.NewOrderedMap(len(fields))
2961 invalid := false
2962 for i, field := range fields {
2963 out.Keys[i] = field.Alias
2964
2965 switch field.Name {
2966 case "__typename":
2967 out.Values[i] = graphql.MarshalString("Comment")
2968 case "author":
2969 out.Values[i] = ec._Comment_author(ctx, field, obj)
2970 if out.Values[i] == graphql.Null {
2971 invalid = true
2972 }
2973 case "message":
2974 out.Values[i] = ec._Comment_message(ctx, field, obj)
2975 if out.Values[i] == graphql.Null {
2976 invalid = true
2977 }
2978 case "files":
2979 out.Values[i] = ec._Comment_files(ctx, field, obj)
2980 if out.Values[i] == graphql.Null {
2981 invalid = true
2982 }
2983 default:
2984 panic("unknown field " + strconv.Quote(field.Name))
2985 }
2986 }
2987
2988 if invalid {
2989 return graphql.Null
2990 }
2991 return out
2992}
2993
2994// nolint: vetshadow
2995func (ec *executionContext) _Comment_author(ctx context.Context, field graphql.CollectedField, obj *bug.Comment) graphql.Marshaler {
2996 rctx := &graphql.ResolverContext{
2997 Object: "Comment",
2998 Args: nil,
2999 Field: field,
3000 }
3001 ctx = graphql.WithResolverContext(ctx, rctx)
3002 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
3003 return obj.Author, nil
3004 })
3005 if resTmp == nil {
3006 if !ec.HasError(rctx) {
3007 ec.Errorf(ctx, "must not be null")
3008 }
3009 return graphql.Null
3010 }
3011 res := resTmp.(bug.Person)
3012 rctx.Result = res
3013
3014 return ec._Person(ctx, field.Selections, &res)
3015}
3016
3017// nolint: vetshadow
3018func (ec *executionContext) _Comment_message(ctx context.Context, field graphql.CollectedField, obj *bug.Comment) graphql.Marshaler {
3019 rctx := &graphql.ResolverContext{
3020 Object: "Comment",
3021 Args: nil,
3022 Field: field,
3023 }
3024 ctx = graphql.WithResolverContext(ctx, rctx)
3025 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
3026 return obj.Message, nil
3027 })
3028 if resTmp == nil {
3029 if !ec.HasError(rctx) {
3030 ec.Errorf(ctx, "must not be null")
3031 }
3032 return graphql.Null
3033 }
3034 res := resTmp.(string)
3035 rctx.Result = res
3036 return graphql.MarshalString(res)
3037}
3038
3039// nolint: vetshadow
3040func (ec *executionContext) _Comment_files(ctx context.Context, field graphql.CollectedField, obj *bug.Comment) graphql.Marshaler {
3041 rctx := &graphql.ResolverContext{
3042 Object: "Comment",
3043 Args: nil,
3044 Field: field,
3045 }
3046 ctx = graphql.WithResolverContext(ctx, rctx)
3047 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
3048 return obj.Files, nil
3049 })
3050 if resTmp == nil {
3051 if !ec.HasError(rctx) {
3052 ec.Errorf(ctx, "must not be null")
3053 }
3054 return graphql.Null
3055 }
3056 res := resTmp.([]git.Hash)
3057 rctx.Result = res
3058
3059 arr1 := make(graphql.Array, len(res))
3060
3061 for idx1 := range res {
3062 arr1[idx1] = func() graphql.Marshaler {
3063 return res[idx1]
3064 }()
3065 }
3066
3067 return arr1
3068}
3069
3070var commentConnectionImplementors = []string{"CommentConnection"}
3071
3072// nolint: gocyclo, errcheck, gas, goconst
3073func (ec *executionContext) _CommentConnection(ctx context.Context, sel ast.SelectionSet, obj *models.CommentConnection) graphql.Marshaler {
3074 fields := graphql.CollectFields(ctx, sel, commentConnectionImplementors)
3075
3076 out := graphql.NewOrderedMap(len(fields))
3077 invalid := false
3078 for i, field := range fields {
3079 out.Keys[i] = field.Alias
3080
3081 switch field.Name {
3082 case "__typename":
3083 out.Values[i] = graphql.MarshalString("CommentConnection")
3084 case "edges":
3085 out.Values[i] = ec._CommentConnection_edges(ctx, field, obj)
3086 if out.Values[i] == graphql.Null {
3087 invalid = true
3088 }
3089 case "nodes":
3090 out.Values[i] = ec._CommentConnection_nodes(ctx, field, obj)
3091 if out.Values[i] == graphql.Null {
3092 invalid = true
3093 }
3094 case "pageInfo":
3095 out.Values[i] = ec._CommentConnection_pageInfo(ctx, field, obj)
3096 if out.Values[i] == graphql.Null {
3097 invalid = true
3098 }
3099 case "totalCount":
3100 out.Values[i] = ec._CommentConnection_totalCount(ctx, field, obj)
3101 if out.Values[i] == graphql.Null {
3102 invalid = true
3103 }
3104 default:
3105 panic("unknown field " + strconv.Quote(field.Name))
3106 }
3107 }
3108
3109 if invalid {
3110 return graphql.Null
3111 }
3112 return out
3113}
3114
3115// nolint: vetshadow
3116func (ec *executionContext) _CommentConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) graphql.Marshaler {
3117 rctx := &graphql.ResolverContext{
3118 Object: "CommentConnection",
3119 Args: nil,
3120 Field: field,
3121 }
3122 ctx = graphql.WithResolverContext(ctx, rctx)
3123 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
3124 return obj.Edges, nil
3125 })
3126 if resTmp == nil {
3127 if !ec.HasError(rctx) {
3128 ec.Errorf(ctx, "must not be null")
3129 }
3130 return graphql.Null
3131 }
3132 res := resTmp.([]models.CommentEdge)
3133 rctx.Result = res
3134
3135 arr1 := make(graphql.Array, len(res))
3136 var wg sync.WaitGroup
3137
3138 isLen1 := len(res) == 1
3139 if !isLen1 {
3140 wg.Add(len(res))
3141 }
3142
3143 for idx1 := range res {
3144 idx1 := idx1
3145 rctx := &graphql.ResolverContext{
3146 Index: &idx1,
3147 Result: &res[idx1],
3148 }
3149 ctx := graphql.WithResolverContext(ctx, rctx)
3150 f := func(idx1 int) {
3151 if !isLen1 {
3152 defer wg.Done()
3153 }
3154 arr1[idx1] = func() graphql.Marshaler {
3155
3156 return ec._CommentEdge(ctx, field.Selections, &res[idx1])
3157 }()
3158 }
3159 if isLen1 {
3160 f(idx1)
3161 } else {
3162 go f(idx1)
3163 }
3164
3165 }
3166 wg.Wait()
3167 return arr1
3168}
3169
3170// nolint: vetshadow
3171func (ec *executionContext) _CommentConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) graphql.Marshaler {
3172 rctx := &graphql.ResolverContext{
3173 Object: "CommentConnection",
3174 Args: nil,
3175 Field: field,
3176 }
3177 ctx = graphql.WithResolverContext(ctx, rctx)
3178 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
3179 return obj.Nodes, nil
3180 })
3181 if resTmp == nil {
3182 if !ec.HasError(rctx) {
3183 ec.Errorf(ctx, "must not be null")
3184 }
3185 return graphql.Null
3186 }
3187 res := resTmp.([]bug.Comment)
3188 rctx.Result = res
3189
3190 arr1 := make(graphql.Array, len(res))
3191 var wg sync.WaitGroup
3192
3193 isLen1 := len(res) == 1
3194 if !isLen1 {
3195 wg.Add(len(res))
3196 }
3197
3198 for idx1 := range res {
3199 idx1 := idx1
3200 rctx := &graphql.ResolverContext{
3201 Index: &idx1,
3202 Result: &res[idx1],
3203 }
3204 ctx := graphql.WithResolverContext(ctx, rctx)
3205 f := func(idx1 int) {
3206 if !isLen1 {
3207 defer wg.Done()
3208 }
3209 arr1[idx1] = func() graphql.Marshaler {
3210
3211 return ec._Comment(ctx, field.Selections, &res[idx1])
3212 }()
3213 }
3214 if isLen1 {
3215 f(idx1)
3216 } else {
3217 go f(idx1)
3218 }
3219
3220 }
3221 wg.Wait()
3222 return arr1
3223}
3224
3225// nolint: vetshadow
3226func (ec *executionContext) _CommentConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) graphql.Marshaler {
3227 rctx := &graphql.ResolverContext{
3228 Object: "CommentConnection",
3229 Args: nil,
3230 Field: field,
3231 }
3232 ctx = graphql.WithResolverContext(ctx, rctx)
3233 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
3234 return obj.PageInfo, nil
3235 })
3236 if resTmp == nil {
3237 if !ec.HasError(rctx) {
3238 ec.Errorf(ctx, "must not be null")
3239 }
3240 return graphql.Null
3241 }
3242 res := resTmp.(models.PageInfo)
3243 rctx.Result = res
3244
3245 return ec._PageInfo(ctx, field.Selections, &res)
3246}
3247
3248// nolint: vetshadow
3249func (ec *executionContext) _CommentConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) graphql.Marshaler {
3250 rctx := &graphql.ResolverContext{
3251 Object: "CommentConnection",
3252 Args: nil,
3253 Field: field,
3254 }
3255 ctx = graphql.WithResolverContext(ctx, rctx)
3256 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
3257 return obj.TotalCount, nil
3258 })
3259 if resTmp == nil {
3260 if !ec.HasError(rctx) {
3261 ec.Errorf(ctx, "must not be null")
3262 }
3263 return graphql.Null
3264 }
3265 res := resTmp.(int)
3266 rctx.Result = res
3267 return graphql.MarshalInt(res)
3268}
3269
3270var commentEdgeImplementors = []string{"CommentEdge"}
3271
3272// nolint: gocyclo, errcheck, gas, goconst
3273func (ec *executionContext) _CommentEdge(ctx context.Context, sel ast.SelectionSet, obj *models.CommentEdge) graphql.Marshaler {
3274 fields := graphql.CollectFields(ctx, sel, commentEdgeImplementors)
3275
3276 out := graphql.NewOrderedMap(len(fields))
3277 invalid := false
3278 for i, field := range fields {
3279 out.Keys[i] = field.Alias
3280
3281 switch field.Name {
3282 case "__typename":
3283 out.Values[i] = graphql.MarshalString("CommentEdge")
3284 case "cursor":
3285 out.Values[i] = ec._CommentEdge_cursor(ctx, field, obj)
3286 if out.Values[i] == graphql.Null {
3287 invalid = true
3288 }
3289 case "node":
3290 out.Values[i] = ec._CommentEdge_node(ctx, field, obj)
3291 if out.Values[i] == graphql.Null {
3292 invalid = true
3293 }
3294 default:
3295 panic("unknown field " + strconv.Quote(field.Name))
3296 }
3297 }
3298
3299 if invalid {
3300 return graphql.Null
3301 }
3302 return out
3303}
3304
3305// nolint: vetshadow
3306func (ec *executionContext) _CommentEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.CommentEdge) graphql.Marshaler {
3307 rctx := &graphql.ResolverContext{
3308 Object: "CommentEdge",
3309 Args: nil,
3310 Field: field,
3311 }
3312 ctx = graphql.WithResolverContext(ctx, rctx)
3313 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
3314 return obj.Cursor, nil
3315 })
3316 if resTmp == nil {
3317 if !ec.HasError(rctx) {
3318 ec.Errorf(ctx, "must not be null")
3319 }
3320 return graphql.Null
3321 }
3322 res := resTmp.(string)
3323 rctx.Result = res
3324 return graphql.MarshalString(res)
3325}
3326
3327// nolint: vetshadow
3328func (ec *executionContext) _CommentEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.CommentEdge) graphql.Marshaler {
3329 rctx := &graphql.ResolverContext{
3330 Object: "CommentEdge",
3331 Args: nil,
3332 Field: field,
3333 }
3334 ctx = graphql.WithResolverContext(ctx, rctx)
3335 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
3336 return obj.Node, nil
3337 })
3338 if resTmp == nil {
3339 if !ec.HasError(rctx) {
3340 ec.Errorf(ctx, "must not be null")
3341 }
3342 return graphql.Null
3343 }
3344 res := resTmp.(bug.Comment)
3345 rctx.Result = res
3346
3347 return ec._Comment(ctx, field.Selections, &res)
3348}
3349
3350var commentHistoryStepImplementors = []string{"CommentHistoryStep"}
3351
3352// nolint: gocyclo, errcheck, gas, goconst
3353func (ec *executionContext) _CommentHistoryStep(ctx context.Context, sel ast.SelectionSet, obj *bug.CommentHistoryStep) graphql.Marshaler {
3354 fields := graphql.CollectFields(ctx, sel, commentHistoryStepImplementors)
3355
3356 var wg sync.WaitGroup
3357 out := graphql.NewOrderedMap(len(fields))
3358 invalid := false
3359 for i, field := range fields {
3360 out.Keys[i] = field.Alias
3361
3362 switch field.Name {
3363 case "__typename":
3364 out.Values[i] = graphql.MarshalString("CommentHistoryStep")
3365 case "message":
3366 out.Values[i] = ec._CommentHistoryStep_message(ctx, field, obj)
3367 if out.Values[i] == graphql.Null {
3368 invalid = true
3369 }
3370 case "date":
3371 wg.Add(1)
3372 go func(i int, field graphql.CollectedField) {
3373 out.Values[i] = ec._CommentHistoryStep_date(ctx, field, obj)
3374 if out.Values[i] == graphql.Null {
3375 invalid = true
3376 }
3377 wg.Done()
3378 }(i, field)
3379 default:
3380 panic("unknown field " + strconv.Quote(field.Name))
3381 }
3382 }
3383 wg.Wait()
3384 if invalid {
3385 return graphql.Null
3386 }
3387 return out
3388}
3389
3390// nolint: vetshadow
3391func (ec *executionContext) _CommentHistoryStep_message(ctx context.Context, field graphql.CollectedField, obj *bug.CommentHistoryStep) graphql.Marshaler {
3392 rctx := &graphql.ResolverContext{
3393 Object: "CommentHistoryStep",
3394 Args: nil,
3395 Field: field,
3396 }
3397 ctx = graphql.WithResolverContext(ctx, rctx)
3398 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
3399 return obj.Message, nil
3400 })
3401 if resTmp == nil {
3402 if !ec.HasError(rctx) {
3403 ec.Errorf(ctx, "must not be null")
3404 }
3405 return graphql.Null
3406 }
3407 res := resTmp.(string)
3408 rctx.Result = res
3409 return graphql.MarshalString(res)
3410}
3411
3412// nolint: vetshadow
3413func (ec *executionContext) _CommentHistoryStep_date(ctx context.Context, field graphql.CollectedField, obj *bug.CommentHistoryStep) graphql.Marshaler {
3414 rctx := &graphql.ResolverContext{
3415 Object: "CommentHistoryStep",
3416 Args: nil,
3417 Field: field,
3418 }
3419 ctx = graphql.WithResolverContext(ctx, rctx)
3420 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
3421 return ec.resolvers.CommentHistoryStep().Date(ctx, obj)
3422 })
3423 if resTmp == nil {
3424 if !ec.HasError(rctx) {
3425 ec.Errorf(ctx, "must not be null")
3426 }
3427 return graphql.Null
3428 }
3429 res := resTmp.(time.Time)
3430 rctx.Result = res
3431 return graphql.MarshalTime(res)
3432}
3433
3434var createOperationImplementors = []string{"CreateOperation", "Operation", "Authored"}
3435
3436// nolint: gocyclo, errcheck, gas, goconst
3437func (ec *executionContext) _CreateOperation(ctx context.Context, sel ast.SelectionSet, obj *bug.CreateOperation) graphql.Marshaler {
3438 fields := graphql.CollectFields(ctx, sel, createOperationImplementors)
3439
3440 var wg sync.WaitGroup
3441 out := graphql.NewOrderedMap(len(fields))
3442 invalid := false
3443 for i, field := range fields {
3444 out.Keys[i] = field.Alias
3445
3446 switch field.Name {
3447 case "__typename":
3448 out.Values[i] = graphql.MarshalString("CreateOperation")
3449 case "author":
3450 out.Values[i] = ec._CreateOperation_author(ctx, field, obj)
3451 if out.Values[i] == graphql.Null {
3452 invalid = true
3453 }
3454 case "date":
3455 wg.Add(1)
3456 go func(i int, field graphql.CollectedField) {
3457 out.Values[i] = ec._CreateOperation_date(ctx, field, obj)
3458 if out.Values[i] == graphql.Null {
3459 invalid = true
3460 }
3461 wg.Done()
3462 }(i, field)
3463 case "title":
3464 out.Values[i] = ec._CreateOperation_title(ctx, field, obj)
3465 if out.Values[i] == graphql.Null {
3466 invalid = true
3467 }
3468 case "message":
3469 out.Values[i] = ec._CreateOperation_message(ctx, field, obj)
3470 if out.Values[i] == graphql.Null {
3471 invalid = true
3472 }
3473 case "files":
3474 out.Values[i] = ec._CreateOperation_files(ctx, field, obj)
3475 if out.Values[i] == graphql.Null {
3476 invalid = true
3477 }
3478 default:
3479 panic("unknown field " + strconv.Quote(field.Name))
3480 }
3481 }
3482 wg.Wait()
3483 if invalid {
3484 return graphql.Null
3485 }
3486 return out
3487}
3488
3489// nolint: vetshadow
3490func (ec *executionContext) _CreateOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) graphql.Marshaler {
3491 rctx := &graphql.ResolverContext{
3492 Object: "CreateOperation",
3493 Args: nil,
3494 Field: field,
3495 }
3496 ctx = graphql.WithResolverContext(ctx, rctx)
3497 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
3498 return obj.Author, nil
3499 })
3500 if resTmp == nil {
3501 if !ec.HasError(rctx) {
3502 ec.Errorf(ctx, "must not be null")
3503 }
3504 return graphql.Null
3505 }
3506 res := resTmp.(bug.Person)
3507 rctx.Result = res
3508
3509 return ec._Person(ctx, field.Selections, &res)
3510}
3511
3512// nolint: vetshadow
3513func (ec *executionContext) _CreateOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) graphql.Marshaler {
3514 rctx := &graphql.ResolverContext{
3515 Object: "CreateOperation",
3516 Args: nil,
3517 Field: field,
3518 }
3519 ctx = graphql.WithResolverContext(ctx, rctx)
3520 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
3521 return ec.resolvers.CreateOperation().Date(ctx, obj)
3522 })
3523 if resTmp == nil {
3524 if !ec.HasError(rctx) {
3525 ec.Errorf(ctx, "must not be null")
3526 }
3527 return graphql.Null
3528 }
3529 res := resTmp.(time.Time)
3530 rctx.Result = res
3531 return graphql.MarshalTime(res)
3532}
3533
3534// nolint: vetshadow
3535func (ec *executionContext) _CreateOperation_title(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) graphql.Marshaler {
3536 rctx := &graphql.ResolverContext{
3537 Object: "CreateOperation",
3538 Args: nil,
3539 Field: field,
3540 }
3541 ctx = graphql.WithResolverContext(ctx, rctx)
3542 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
3543 return obj.Title, nil
3544 })
3545 if resTmp == nil {
3546 if !ec.HasError(rctx) {
3547 ec.Errorf(ctx, "must not be null")
3548 }
3549 return graphql.Null
3550 }
3551 res := resTmp.(string)
3552 rctx.Result = res
3553 return graphql.MarshalString(res)
3554}
3555
3556// nolint: vetshadow
3557func (ec *executionContext) _CreateOperation_message(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) graphql.Marshaler {
3558 rctx := &graphql.ResolverContext{
3559 Object: "CreateOperation",
3560 Args: nil,
3561 Field: field,
3562 }
3563 ctx = graphql.WithResolverContext(ctx, rctx)
3564 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
3565 return obj.Message, nil
3566 })
3567 if resTmp == nil {
3568 if !ec.HasError(rctx) {
3569 ec.Errorf(ctx, "must not be null")
3570 }
3571 return graphql.Null
3572 }
3573 res := resTmp.(string)
3574 rctx.Result = res
3575 return graphql.MarshalString(res)
3576}
3577
3578// nolint: vetshadow
3579func (ec *executionContext) _CreateOperation_files(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) graphql.Marshaler {
3580 rctx := &graphql.ResolverContext{
3581 Object: "CreateOperation",
3582 Args: nil,
3583 Field: field,
3584 }
3585 ctx = graphql.WithResolverContext(ctx, rctx)
3586 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
3587 return obj.Files, nil
3588 })
3589 if resTmp == nil {
3590 if !ec.HasError(rctx) {
3591 ec.Errorf(ctx, "must not be null")
3592 }
3593 return graphql.Null
3594 }
3595 res := resTmp.([]git.Hash)
3596 rctx.Result = res
3597
3598 arr1 := make(graphql.Array, len(res))
3599
3600 for idx1 := range res {
3601 arr1[idx1] = func() graphql.Marshaler {
3602 return res[idx1]
3603 }()
3604 }
3605
3606 return arr1
3607}
3608
3609var createTimelineItemImplementors = []string{"CreateTimelineItem", "TimelineItem"}
3610
3611// nolint: gocyclo, errcheck, gas, goconst
3612func (ec *executionContext) _CreateTimelineItem(ctx context.Context, sel ast.SelectionSet, obj *bug.CreateTimelineItem) graphql.Marshaler {
3613 fields := graphql.CollectFields(ctx, sel, createTimelineItemImplementors)
3614
3615 var wg sync.WaitGroup
3616 out := graphql.NewOrderedMap(len(fields))
3617 invalid := false
3618 for i, field := range fields {
3619 out.Keys[i] = field.Alias
3620
3621 switch field.Name {
3622 case "__typename":
3623 out.Values[i] = graphql.MarshalString("CreateTimelineItem")
3624 case "hash":
3625 out.Values[i] = ec._CreateTimelineItem_hash(ctx, field, obj)
3626 if out.Values[i] == graphql.Null {
3627 invalid = true
3628 }
3629 case "author":
3630 out.Values[i] = ec._CreateTimelineItem_author(ctx, field, obj)
3631 if out.Values[i] == graphql.Null {
3632 invalid = true
3633 }
3634 case "message":
3635 out.Values[i] = ec._CreateTimelineItem_message(ctx, field, obj)
3636 if out.Values[i] == graphql.Null {
3637 invalid = true
3638 }
3639 case "files":
3640 out.Values[i] = ec._CreateTimelineItem_files(ctx, field, obj)
3641 if out.Values[i] == graphql.Null {
3642 invalid = true
3643 }
3644 case "createdAt":
3645 wg.Add(1)
3646 go func(i int, field graphql.CollectedField) {
3647 out.Values[i] = ec._CreateTimelineItem_createdAt(ctx, field, obj)
3648 if out.Values[i] == graphql.Null {
3649 invalid = true
3650 }
3651 wg.Done()
3652 }(i, field)
3653 case "lastEdit":
3654 wg.Add(1)
3655 go func(i int, field graphql.CollectedField) {
3656 out.Values[i] = ec._CreateTimelineItem_lastEdit(ctx, field, obj)
3657 if out.Values[i] == graphql.Null {
3658 invalid = true
3659 }
3660 wg.Done()
3661 }(i, field)
3662 case "edited":
3663 out.Values[i] = ec._CreateTimelineItem_edited(ctx, field, obj)
3664 if out.Values[i] == graphql.Null {
3665 invalid = true
3666 }
3667 case "history":
3668 out.Values[i] = ec._CreateTimelineItem_history(ctx, field, obj)
3669 if out.Values[i] == graphql.Null {
3670 invalid = true
3671 }
3672 default:
3673 panic("unknown field " + strconv.Quote(field.Name))
3674 }
3675 }
3676 wg.Wait()
3677 if invalid {
3678 return graphql.Null
3679 }
3680 return out
3681}
3682
3683// nolint: vetshadow
3684func (ec *executionContext) _CreateTimelineItem_hash(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler {
3685 rctx := &graphql.ResolverContext{
3686 Object: "CreateTimelineItem",
3687 Args: nil,
3688 Field: field,
3689 }
3690 ctx = graphql.WithResolverContext(ctx, rctx)
3691 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
3692 return obj.Hash(), nil
3693 })
3694 if resTmp == nil {
3695 if !ec.HasError(rctx) {
3696 ec.Errorf(ctx, "must not be null")
3697 }
3698 return graphql.Null
3699 }
3700 res := resTmp.(git.Hash)
3701 rctx.Result = res
3702 return res
3703}
3704
3705// nolint: vetshadow
3706func (ec *executionContext) _CreateTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler {
3707 rctx := &graphql.ResolverContext{
3708 Object: "CreateTimelineItem",
3709 Args: nil,
3710 Field: field,
3711 }
3712 ctx = graphql.WithResolverContext(ctx, rctx)
3713 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
3714 return obj.Author, nil
3715 })
3716 if resTmp == nil {
3717 if !ec.HasError(rctx) {
3718 ec.Errorf(ctx, "must not be null")
3719 }
3720 return graphql.Null
3721 }
3722 res := resTmp.(bug.Person)
3723 rctx.Result = res
3724
3725 return ec._Person(ctx, field.Selections, &res)
3726}
3727
3728// nolint: vetshadow
3729func (ec *executionContext) _CreateTimelineItem_message(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler {
3730 rctx := &graphql.ResolverContext{
3731 Object: "CreateTimelineItem",
3732 Args: nil,
3733 Field: field,
3734 }
3735 ctx = graphql.WithResolverContext(ctx, rctx)
3736 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
3737 return obj.Message, nil
3738 })
3739 if resTmp == nil {
3740 if !ec.HasError(rctx) {
3741 ec.Errorf(ctx, "must not be null")
3742 }
3743 return graphql.Null
3744 }
3745 res := resTmp.(string)
3746 rctx.Result = res
3747 return graphql.MarshalString(res)
3748}
3749
3750// nolint: vetshadow
3751func (ec *executionContext) _CreateTimelineItem_files(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler {
3752 rctx := &graphql.ResolverContext{
3753 Object: "CreateTimelineItem",
3754 Args: nil,
3755 Field: field,
3756 }
3757 ctx = graphql.WithResolverContext(ctx, rctx)
3758 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
3759 return obj.Files, nil
3760 })
3761 if resTmp == nil {
3762 if !ec.HasError(rctx) {
3763 ec.Errorf(ctx, "must not be null")
3764 }
3765 return graphql.Null
3766 }
3767 res := resTmp.([]git.Hash)
3768 rctx.Result = res
3769
3770 arr1 := make(graphql.Array, len(res))
3771
3772 for idx1 := range res {
3773 arr1[idx1] = func() graphql.Marshaler {
3774 return res[idx1]
3775 }()
3776 }
3777
3778 return arr1
3779}
3780
3781// nolint: vetshadow
3782func (ec *executionContext) _CreateTimelineItem_createdAt(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler {
3783 rctx := &graphql.ResolverContext{
3784 Object: "CreateTimelineItem",
3785 Args: nil,
3786 Field: field,
3787 }
3788 ctx = graphql.WithResolverContext(ctx, rctx)
3789 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
3790 return ec.resolvers.CreateTimelineItem().CreatedAt(ctx, obj)
3791 })
3792 if resTmp == nil {
3793 if !ec.HasError(rctx) {
3794 ec.Errorf(ctx, "must not be null")
3795 }
3796 return graphql.Null
3797 }
3798 res := resTmp.(time.Time)
3799 rctx.Result = res
3800 return graphql.MarshalTime(res)
3801}
3802
3803// nolint: vetshadow
3804func (ec *executionContext) _CreateTimelineItem_lastEdit(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler {
3805 rctx := &graphql.ResolverContext{
3806 Object: "CreateTimelineItem",
3807 Args: nil,
3808 Field: field,
3809 }
3810 ctx = graphql.WithResolverContext(ctx, rctx)
3811 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
3812 return ec.resolvers.CreateTimelineItem().LastEdit(ctx, obj)
3813 })
3814 if resTmp == nil {
3815 if !ec.HasError(rctx) {
3816 ec.Errorf(ctx, "must not be null")
3817 }
3818 return graphql.Null
3819 }
3820 res := resTmp.(time.Time)
3821 rctx.Result = res
3822 return graphql.MarshalTime(res)
3823}
3824
3825// nolint: vetshadow
3826func (ec *executionContext) _CreateTimelineItem_edited(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler {
3827 rctx := &graphql.ResolverContext{
3828 Object: "CreateTimelineItem",
3829 Args: nil,
3830 Field: field,
3831 }
3832 ctx = graphql.WithResolverContext(ctx, rctx)
3833 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
3834 return obj.Edited(), nil
3835 })
3836 if resTmp == nil {
3837 if !ec.HasError(rctx) {
3838 ec.Errorf(ctx, "must not be null")
3839 }
3840 return graphql.Null
3841 }
3842 res := resTmp.(bool)
3843 rctx.Result = res
3844 return graphql.MarshalBoolean(res)
3845}
3846
3847// nolint: vetshadow
3848func (ec *executionContext) _CreateTimelineItem_history(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler {
3849 rctx := &graphql.ResolverContext{
3850 Object: "CreateTimelineItem",
3851 Args: nil,
3852 Field: field,
3853 }
3854 ctx = graphql.WithResolverContext(ctx, rctx)
3855 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
3856 return obj.History, nil
3857 })
3858 if resTmp == nil {
3859 if !ec.HasError(rctx) {
3860 ec.Errorf(ctx, "must not be null")
3861 }
3862 return graphql.Null
3863 }
3864 res := resTmp.([]bug.CommentHistoryStep)
3865 rctx.Result = res
3866
3867 arr1 := make(graphql.Array, len(res))
3868 var wg sync.WaitGroup
3869
3870 isLen1 := len(res) == 1
3871 if !isLen1 {
3872 wg.Add(len(res))
3873 }
3874
3875 for idx1 := range res {
3876 idx1 := idx1
3877 rctx := &graphql.ResolverContext{
3878 Index: &idx1,
3879 Result: &res[idx1],
3880 }
3881 ctx := graphql.WithResolverContext(ctx, rctx)
3882 f := func(idx1 int) {
3883 if !isLen1 {
3884 defer wg.Done()
3885 }
3886 arr1[idx1] = func() graphql.Marshaler {
3887
3888 return ec._CommentHistoryStep(ctx, field.Selections, &res[idx1])
3889 }()
3890 }
3891 if isLen1 {
3892 f(idx1)
3893 } else {
3894 go f(idx1)
3895 }
3896
3897 }
3898 wg.Wait()
3899 return arr1
3900}
3901
3902var labelChangeOperationImplementors = []string{"LabelChangeOperation", "Operation", "Authored"}
3903
3904// nolint: gocyclo, errcheck, gas, goconst
3905func (ec *executionContext) _LabelChangeOperation(ctx context.Context, sel ast.SelectionSet, obj *bug.LabelChangeOperation) graphql.Marshaler {
3906 fields := graphql.CollectFields(ctx, sel, labelChangeOperationImplementors)
3907
3908 var wg sync.WaitGroup
3909 out := graphql.NewOrderedMap(len(fields))
3910 invalid := false
3911 for i, field := range fields {
3912 out.Keys[i] = field.Alias
3913
3914 switch field.Name {
3915 case "__typename":
3916 out.Values[i] = graphql.MarshalString("LabelChangeOperation")
3917 case "hash":
3918 out.Values[i] = ec._LabelChangeOperation_hash(ctx, field, obj)
3919 if out.Values[i] == graphql.Null {
3920 invalid = true
3921 }
3922 case "author":
3923 out.Values[i] = ec._LabelChangeOperation_author(ctx, field, obj)
3924 if out.Values[i] == graphql.Null {
3925 invalid = true
3926 }
3927 case "date":
3928 wg.Add(1)
3929 go func(i int, field graphql.CollectedField) {
3930 out.Values[i] = ec._LabelChangeOperation_date(ctx, field, obj)
3931 if out.Values[i] == graphql.Null {
3932 invalid = true
3933 }
3934 wg.Done()
3935 }(i, field)
3936 case "added":
3937 out.Values[i] = ec._LabelChangeOperation_added(ctx, field, obj)
3938 if out.Values[i] == graphql.Null {
3939 invalid = true
3940 }
3941 case "removed":
3942 out.Values[i] = ec._LabelChangeOperation_removed(ctx, field, obj)
3943 if out.Values[i] == graphql.Null {
3944 invalid = true
3945 }
3946 default:
3947 panic("unknown field " + strconv.Quote(field.Name))
3948 }
3949 }
3950 wg.Wait()
3951 if invalid {
3952 return graphql.Null
3953 }
3954 return out
3955}
3956
3957// nolint: vetshadow
3958func (ec *executionContext) _LabelChangeOperation_hash(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) graphql.Marshaler {
3959 rctx := &graphql.ResolverContext{
3960 Object: "LabelChangeOperation",
3961 Args: nil,
3962 Field: field,
3963 }
3964 ctx = graphql.WithResolverContext(ctx, rctx)
3965 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
3966 return obj.Hash()
3967 })
3968 if resTmp == nil {
3969 if !ec.HasError(rctx) {
3970 ec.Errorf(ctx, "must not be null")
3971 }
3972 return graphql.Null
3973 }
3974 res := resTmp.(git.Hash)
3975 rctx.Result = res
3976 return res
3977}
3978
3979// nolint: vetshadow
3980func (ec *executionContext) _LabelChangeOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) graphql.Marshaler {
3981 rctx := &graphql.ResolverContext{
3982 Object: "LabelChangeOperation",
3983 Args: nil,
3984 Field: field,
3985 }
3986 ctx = graphql.WithResolverContext(ctx, rctx)
3987 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
3988 return obj.Author, nil
3989 })
3990 if resTmp == nil {
3991 if !ec.HasError(rctx) {
3992 ec.Errorf(ctx, "must not be null")
3993 }
3994 return graphql.Null
3995 }
3996 res := resTmp.(bug.Person)
3997 rctx.Result = res
3998
3999 return ec._Person(ctx, field.Selections, &res)
4000}
4001
4002// nolint: vetshadow
4003func (ec *executionContext) _LabelChangeOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) graphql.Marshaler {
4004 rctx := &graphql.ResolverContext{
4005 Object: "LabelChangeOperation",
4006 Args: nil,
4007 Field: field,
4008 }
4009 ctx = graphql.WithResolverContext(ctx, rctx)
4010 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
4011 return ec.resolvers.LabelChangeOperation().Date(ctx, obj)
4012 })
4013 if resTmp == nil {
4014 if !ec.HasError(rctx) {
4015 ec.Errorf(ctx, "must not be null")
4016 }
4017 return graphql.Null
4018 }
4019 res := resTmp.(time.Time)
4020 rctx.Result = res
4021 return graphql.MarshalTime(res)
4022}
4023
4024// nolint: vetshadow
4025func (ec *executionContext) _LabelChangeOperation_added(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) graphql.Marshaler {
4026 rctx := &graphql.ResolverContext{
4027 Object: "LabelChangeOperation",
4028 Args: nil,
4029 Field: field,
4030 }
4031 ctx = graphql.WithResolverContext(ctx, rctx)
4032 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
4033 return obj.Added, nil
4034 })
4035 if resTmp == nil {
4036 if !ec.HasError(rctx) {
4037 ec.Errorf(ctx, "must not be null")
4038 }
4039 return graphql.Null
4040 }
4041 res := resTmp.([]bug.Label)
4042 rctx.Result = res
4043
4044 arr1 := make(graphql.Array, len(res))
4045
4046 for idx1 := range res {
4047 arr1[idx1] = func() graphql.Marshaler {
4048 return res[idx1]
4049 }()
4050 }
4051
4052 return arr1
4053}
4054
4055// nolint: vetshadow
4056func (ec *executionContext) _LabelChangeOperation_removed(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) graphql.Marshaler {
4057 rctx := &graphql.ResolverContext{
4058 Object: "LabelChangeOperation",
4059 Args: nil,
4060 Field: field,
4061 }
4062 ctx = graphql.WithResolverContext(ctx, rctx)
4063 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
4064 return obj.Removed, nil
4065 })
4066 if resTmp == nil {
4067 if !ec.HasError(rctx) {
4068 ec.Errorf(ctx, "must not be null")
4069 }
4070 return graphql.Null
4071 }
4072 res := resTmp.([]bug.Label)
4073 rctx.Result = res
4074
4075 arr1 := make(graphql.Array, len(res))
4076
4077 for idx1 := range res {
4078 arr1[idx1] = func() graphql.Marshaler {
4079 return res[idx1]
4080 }()
4081 }
4082
4083 return arr1
4084}
4085
4086var labelChangeTimelineItemImplementors = []string{"LabelChangeTimelineItem", "TimelineItem"}
4087
4088// nolint: gocyclo, errcheck, gas, goconst
4089func (ec *executionContext) _LabelChangeTimelineItem(ctx context.Context, sel ast.SelectionSet, obj *bug.LabelChangeTimelineItem) graphql.Marshaler {
4090 fields := graphql.CollectFields(ctx, sel, labelChangeTimelineItemImplementors)
4091
4092 var wg sync.WaitGroup
4093 out := graphql.NewOrderedMap(len(fields))
4094 invalid := false
4095 for i, field := range fields {
4096 out.Keys[i] = field.Alias
4097
4098 switch field.Name {
4099 case "__typename":
4100 out.Values[i] = graphql.MarshalString("LabelChangeTimelineItem")
4101 case "hash":
4102 out.Values[i] = ec._LabelChangeTimelineItem_hash(ctx, field, obj)
4103 if out.Values[i] == graphql.Null {
4104 invalid = true
4105 }
4106 case "author":
4107 out.Values[i] = ec._LabelChangeTimelineItem_author(ctx, field, obj)
4108 if out.Values[i] == graphql.Null {
4109 invalid = true
4110 }
4111 case "date":
4112 wg.Add(1)
4113 go func(i int, field graphql.CollectedField) {
4114 out.Values[i] = ec._LabelChangeTimelineItem_date(ctx, field, obj)
4115 if out.Values[i] == graphql.Null {
4116 invalid = true
4117 }
4118 wg.Done()
4119 }(i, field)
4120 case "added":
4121 out.Values[i] = ec._LabelChangeTimelineItem_added(ctx, field, obj)
4122 if out.Values[i] == graphql.Null {
4123 invalid = true
4124 }
4125 case "removed":
4126 out.Values[i] = ec._LabelChangeTimelineItem_removed(ctx, field, obj)
4127 if out.Values[i] == graphql.Null {
4128 invalid = true
4129 }
4130 default:
4131 panic("unknown field " + strconv.Quote(field.Name))
4132 }
4133 }
4134 wg.Wait()
4135 if invalid {
4136 return graphql.Null
4137 }
4138 return out
4139}
4140
4141// nolint: vetshadow
4142func (ec *executionContext) _LabelChangeTimelineItem_hash(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) graphql.Marshaler {
4143 rctx := &graphql.ResolverContext{
4144 Object: "LabelChangeTimelineItem",
4145 Args: nil,
4146 Field: field,
4147 }
4148 ctx = graphql.WithResolverContext(ctx, rctx)
4149 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
4150 return obj.Hash(), nil
4151 })
4152 if resTmp == nil {
4153 if !ec.HasError(rctx) {
4154 ec.Errorf(ctx, "must not be null")
4155 }
4156 return graphql.Null
4157 }
4158 res := resTmp.(git.Hash)
4159 rctx.Result = res
4160 return res
4161}
4162
4163// nolint: vetshadow
4164func (ec *executionContext) _LabelChangeTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) graphql.Marshaler {
4165 rctx := &graphql.ResolverContext{
4166 Object: "LabelChangeTimelineItem",
4167 Args: nil,
4168 Field: field,
4169 }
4170 ctx = graphql.WithResolverContext(ctx, rctx)
4171 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
4172 return obj.Author, nil
4173 })
4174 if resTmp == nil {
4175 if !ec.HasError(rctx) {
4176 ec.Errorf(ctx, "must not be null")
4177 }
4178 return graphql.Null
4179 }
4180 res := resTmp.(bug.Person)
4181 rctx.Result = res
4182
4183 return ec._Person(ctx, field.Selections, &res)
4184}
4185
4186// nolint: vetshadow
4187func (ec *executionContext) _LabelChangeTimelineItem_date(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) graphql.Marshaler {
4188 rctx := &graphql.ResolverContext{
4189 Object: "LabelChangeTimelineItem",
4190 Args: nil,
4191 Field: field,
4192 }
4193 ctx = graphql.WithResolverContext(ctx, rctx)
4194 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
4195 return ec.resolvers.LabelChangeTimelineItem().Date(ctx, obj)
4196 })
4197 if resTmp == nil {
4198 if !ec.HasError(rctx) {
4199 ec.Errorf(ctx, "must not be null")
4200 }
4201 return graphql.Null
4202 }
4203 res := resTmp.(time.Time)
4204 rctx.Result = res
4205 return graphql.MarshalTime(res)
4206}
4207
4208// nolint: vetshadow
4209func (ec *executionContext) _LabelChangeTimelineItem_added(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) graphql.Marshaler {
4210 rctx := &graphql.ResolverContext{
4211 Object: "LabelChangeTimelineItem",
4212 Args: nil,
4213 Field: field,
4214 }
4215 ctx = graphql.WithResolverContext(ctx, rctx)
4216 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
4217 return obj.Added, nil
4218 })
4219 if resTmp == nil {
4220 if !ec.HasError(rctx) {
4221 ec.Errorf(ctx, "must not be null")
4222 }
4223 return graphql.Null
4224 }
4225 res := resTmp.([]bug.Label)
4226 rctx.Result = res
4227
4228 arr1 := make(graphql.Array, len(res))
4229
4230 for idx1 := range res {
4231 arr1[idx1] = func() graphql.Marshaler {
4232 return res[idx1]
4233 }()
4234 }
4235
4236 return arr1
4237}
4238
4239// nolint: vetshadow
4240func (ec *executionContext) _LabelChangeTimelineItem_removed(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) graphql.Marshaler {
4241 rctx := &graphql.ResolverContext{
4242 Object: "LabelChangeTimelineItem",
4243 Args: nil,
4244 Field: field,
4245 }
4246 ctx = graphql.WithResolverContext(ctx, rctx)
4247 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
4248 return obj.Removed, nil
4249 })
4250 if resTmp == nil {
4251 if !ec.HasError(rctx) {
4252 ec.Errorf(ctx, "must not be null")
4253 }
4254 return graphql.Null
4255 }
4256 res := resTmp.([]bug.Label)
4257 rctx.Result = res
4258
4259 arr1 := make(graphql.Array, len(res))
4260
4261 for idx1 := range res {
4262 arr1[idx1] = func() graphql.Marshaler {
4263 return res[idx1]
4264 }()
4265 }
4266
4267 return arr1
4268}
4269
4270var mutationImplementors = []string{"Mutation"}
4271
4272// nolint: gocyclo, errcheck, gas, goconst
4273func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
4274 fields := graphql.CollectFields(ctx, sel, mutationImplementors)
4275
4276 ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
4277 Object: "Mutation",
4278 })
4279
4280 out := graphql.NewOrderedMap(len(fields))
4281 invalid := false
4282 for i, field := range fields {
4283 out.Keys[i] = field.Alias
4284
4285 switch field.Name {
4286 case "__typename":
4287 out.Values[i] = graphql.MarshalString("Mutation")
4288 case "newBug":
4289 out.Values[i] = ec._Mutation_newBug(ctx, field)
4290 if out.Values[i] == graphql.Null {
4291 invalid = true
4292 }
4293 case "addComment":
4294 out.Values[i] = ec._Mutation_addComment(ctx, field)
4295 if out.Values[i] == graphql.Null {
4296 invalid = true
4297 }
4298 case "changeLabels":
4299 out.Values[i] = ec._Mutation_changeLabels(ctx, field)
4300 if out.Values[i] == graphql.Null {
4301 invalid = true
4302 }
4303 case "open":
4304 out.Values[i] = ec._Mutation_open(ctx, field)
4305 if out.Values[i] == graphql.Null {
4306 invalid = true
4307 }
4308 case "close":
4309 out.Values[i] = ec._Mutation_close(ctx, field)
4310 if out.Values[i] == graphql.Null {
4311 invalid = true
4312 }
4313 case "setTitle":
4314 out.Values[i] = ec._Mutation_setTitle(ctx, field)
4315 if out.Values[i] == graphql.Null {
4316 invalid = true
4317 }
4318 case "commit":
4319 out.Values[i] = ec._Mutation_commit(ctx, field)
4320 if out.Values[i] == graphql.Null {
4321 invalid = true
4322 }
4323 default:
4324 panic("unknown field " + strconv.Quote(field.Name))
4325 }
4326 }
4327
4328 if invalid {
4329 return graphql.Null
4330 }
4331 return out
4332}
4333
4334// nolint: vetshadow
4335func (ec *executionContext) _Mutation_newBug(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
4336 rawArgs := field.ArgumentMap(ec.Variables)
4337 args, err := field_Mutation_newBug_args(rawArgs)
4338 if err != nil {
4339 ec.Error(ctx, err)
4340 return graphql.Null
4341 }
4342 rctx := &graphql.ResolverContext{
4343 Object: "Mutation",
4344 Args: args,
4345 Field: field,
4346 }
4347 ctx = graphql.WithResolverContext(ctx, rctx)
4348 resTmp := ec.FieldMiddleware(ctx, nil, func(ctx context.Context) (interface{}, error) {
4349 return ec.resolvers.Mutation().NewBug(ctx, args["repoRef"].(*string), args["title"].(string), args["message"].(string), args["files"].([]git.Hash))
4350 })
4351 if resTmp == nil {
4352 if !ec.HasError(rctx) {
4353 ec.Errorf(ctx, "must not be null")
4354 }
4355 return graphql.Null
4356 }
4357 res := resTmp.(bug.Snapshot)
4358 rctx.Result = res
4359
4360 return ec._Bug(ctx, field.Selections, &res)
4361}
4362
4363// nolint: vetshadow
4364func (ec *executionContext) _Mutation_addComment(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
4365 rawArgs := field.ArgumentMap(ec.Variables)
4366 args, err := field_Mutation_addComment_args(rawArgs)
4367 if err != nil {
4368 ec.Error(ctx, err)
4369 return graphql.Null
4370 }
4371 rctx := &graphql.ResolverContext{
4372 Object: "Mutation",
4373 Args: args,
4374 Field: field,
4375 }
4376 ctx = graphql.WithResolverContext(ctx, rctx)
4377 resTmp := ec.FieldMiddleware(ctx, nil, func(ctx context.Context) (interface{}, error) {
4378 return ec.resolvers.Mutation().AddComment(ctx, args["repoRef"].(*string), args["prefix"].(string), args["message"].(string), args["files"].([]git.Hash))
4379 })
4380 if resTmp == nil {
4381 if !ec.HasError(rctx) {
4382 ec.Errorf(ctx, "must not be null")
4383 }
4384 return graphql.Null
4385 }
4386 res := resTmp.(bug.Snapshot)
4387 rctx.Result = res
4388
4389 return ec._Bug(ctx, field.Selections, &res)
4390}
4391
4392// nolint: vetshadow
4393func (ec *executionContext) _Mutation_changeLabels(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
4394 rawArgs := field.ArgumentMap(ec.Variables)
4395 args, err := field_Mutation_changeLabels_args(rawArgs)
4396 if err != nil {
4397 ec.Error(ctx, err)
4398 return graphql.Null
4399 }
4400 rctx := &graphql.ResolverContext{
4401 Object: "Mutation",
4402 Args: args,
4403 Field: field,
4404 }
4405 ctx = graphql.WithResolverContext(ctx, rctx)
4406 resTmp := ec.FieldMiddleware(ctx, nil, func(ctx context.Context) (interface{}, error) {
4407 return ec.resolvers.Mutation().ChangeLabels(ctx, args["repoRef"].(*string), args["prefix"].(string), args["added"].([]string), args["removed"].([]string))
4408 })
4409 if resTmp == nil {
4410 if !ec.HasError(rctx) {
4411 ec.Errorf(ctx, "must not be null")
4412 }
4413 return graphql.Null
4414 }
4415 res := resTmp.(bug.Snapshot)
4416 rctx.Result = res
4417
4418 return ec._Bug(ctx, field.Selections, &res)
4419}
4420
4421// nolint: vetshadow
4422func (ec *executionContext) _Mutation_open(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
4423 rawArgs := field.ArgumentMap(ec.Variables)
4424 args, err := field_Mutation_open_args(rawArgs)
4425 if err != nil {
4426 ec.Error(ctx, err)
4427 return graphql.Null
4428 }
4429 rctx := &graphql.ResolverContext{
4430 Object: "Mutation",
4431 Args: args,
4432 Field: field,
4433 }
4434 ctx = graphql.WithResolverContext(ctx, rctx)
4435 resTmp := ec.FieldMiddleware(ctx, nil, func(ctx context.Context) (interface{}, error) {
4436 return ec.resolvers.Mutation().Open(ctx, args["repoRef"].(*string), args["prefix"].(string))
4437 })
4438 if resTmp == nil {
4439 if !ec.HasError(rctx) {
4440 ec.Errorf(ctx, "must not be null")
4441 }
4442 return graphql.Null
4443 }
4444 res := resTmp.(bug.Snapshot)
4445 rctx.Result = res
4446
4447 return ec._Bug(ctx, field.Selections, &res)
4448}
4449
4450// nolint: vetshadow
4451func (ec *executionContext) _Mutation_close(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
4452 rawArgs := field.ArgumentMap(ec.Variables)
4453 args, err := field_Mutation_close_args(rawArgs)
4454 if err != nil {
4455 ec.Error(ctx, err)
4456 return graphql.Null
4457 }
4458 rctx := &graphql.ResolverContext{
4459 Object: "Mutation",
4460 Args: args,
4461 Field: field,
4462 }
4463 ctx = graphql.WithResolverContext(ctx, rctx)
4464 resTmp := ec.FieldMiddleware(ctx, nil, func(ctx context.Context) (interface{}, error) {
4465 return ec.resolvers.Mutation().Close(ctx, args["repoRef"].(*string), args["prefix"].(string))
4466 })
4467 if resTmp == nil {
4468 if !ec.HasError(rctx) {
4469 ec.Errorf(ctx, "must not be null")
4470 }
4471 return graphql.Null
4472 }
4473 res := resTmp.(bug.Snapshot)
4474 rctx.Result = res
4475
4476 return ec._Bug(ctx, field.Selections, &res)
4477}
4478
4479// nolint: vetshadow
4480func (ec *executionContext) _Mutation_setTitle(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
4481 rawArgs := field.ArgumentMap(ec.Variables)
4482 args, err := field_Mutation_setTitle_args(rawArgs)
4483 if err != nil {
4484 ec.Error(ctx, err)
4485 return graphql.Null
4486 }
4487 rctx := &graphql.ResolverContext{
4488 Object: "Mutation",
4489 Args: args,
4490 Field: field,
4491 }
4492 ctx = graphql.WithResolverContext(ctx, rctx)
4493 resTmp := ec.FieldMiddleware(ctx, nil, func(ctx context.Context) (interface{}, error) {
4494 return ec.resolvers.Mutation().SetTitle(ctx, args["repoRef"].(*string), args["prefix"].(string), args["title"].(string))
4495 })
4496 if resTmp == nil {
4497 if !ec.HasError(rctx) {
4498 ec.Errorf(ctx, "must not be null")
4499 }
4500 return graphql.Null
4501 }
4502 res := resTmp.(bug.Snapshot)
4503 rctx.Result = res
4504
4505 return ec._Bug(ctx, field.Selections, &res)
4506}
4507
4508// nolint: vetshadow
4509func (ec *executionContext) _Mutation_commit(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
4510 rawArgs := field.ArgumentMap(ec.Variables)
4511 args, err := field_Mutation_commit_args(rawArgs)
4512 if err != nil {
4513 ec.Error(ctx, err)
4514 return graphql.Null
4515 }
4516 rctx := &graphql.ResolverContext{
4517 Object: "Mutation",
4518 Args: args,
4519 Field: field,
4520 }
4521 ctx = graphql.WithResolverContext(ctx, rctx)
4522 resTmp := ec.FieldMiddleware(ctx, nil, func(ctx context.Context) (interface{}, error) {
4523 return ec.resolvers.Mutation().Commit(ctx, args["repoRef"].(*string), args["prefix"].(string))
4524 })
4525 if resTmp == nil {
4526 if !ec.HasError(rctx) {
4527 ec.Errorf(ctx, "must not be null")
4528 }
4529 return graphql.Null
4530 }
4531 res := resTmp.(bug.Snapshot)
4532 rctx.Result = res
4533
4534 return ec._Bug(ctx, field.Selections, &res)
4535}
4536
4537var operationConnectionImplementors = []string{"OperationConnection"}
4538
4539// nolint: gocyclo, errcheck, gas, goconst
4540func (ec *executionContext) _OperationConnection(ctx context.Context, sel ast.SelectionSet, obj *models.OperationConnection) graphql.Marshaler {
4541 fields := graphql.CollectFields(ctx, sel, operationConnectionImplementors)
4542
4543 out := graphql.NewOrderedMap(len(fields))
4544 invalid := false
4545 for i, field := range fields {
4546 out.Keys[i] = field.Alias
4547
4548 switch field.Name {
4549 case "__typename":
4550 out.Values[i] = graphql.MarshalString("OperationConnection")
4551 case "edges":
4552 out.Values[i] = ec._OperationConnection_edges(ctx, field, obj)
4553 if out.Values[i] == graphql.Null {
4554 invalid = true
4555 }
4556 case "nodes":
4557 out.Values[i] = ec._OperationConnection_nodes(ctx, field, obj)
4558 if out.Values[i] == graphql.Null {
4559 invalid = true
4560 }
4561 case "pageInfo":
4562 out.Values[i] = ec._OperationConnection_pageInfo(ctx, field, obj)
4563 if out.Values[i] == graphql.Null {
4564 invalid = true
4565 }
4566 case "totalCount":
4567 out.Values[i] = ec._OperationConnection_totalCount(ctx, field, obj)
4568 if out.Values[i] == graphql.Null {
4569 invalid = true
4570 }
4571 default:
4572 panic("unknown field " + strconv.Quote(field.Name))
4573 }
4574 }
4575
4576 if invalid {
4577 return graphql.Null
4578 }
4579 return out
4580}
4581
4582// nolint: vetshadow
4583func (ec *executionContext) _OperationConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) graphql.Marshaler {
4584 rctx := &graphql.ResolverContext{
4585 Object: "OperationConnection",
4586 Args: nil,
4587 Field: field,
4588 }
4589 ctx = graphql.WithResolverContext(ctx, rctx)
4590 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
4591 return obj.Edges, nil
4592 })
4593 if resTmp == nil {
4594 if !ec.HasError(rctx) {
4595 ec.Errorf(ctx, "must not be null")
4596 }
4597 return graphql.Null
4598 }
4599 res := resTmp.([]models.OperationEdge)
4600 rctx.Result = res
4601
4602 arr1 := make(graphql.Array, len(res))
4603 var wg sync.WaitGroup
4604
4605 isLen1 := len(res) == 1
4606 if !isLen1 {
4607 wg.Add(len(res))
4608 }
4609
4610 for idx1 := range res {
4611 idx1 := idx1
4612 rctx := &graphql.ResolverContext{
4613 Index: &idx1,
4614 Result: &res[idx1],
4615 }
4616 ctx := graphql.WithResolverContext(ctx, rctx)
4617 f := func(idx1 int) {
4618 if !isLen1 {
4619 defer wg.Done()
4620 }
4621 arr1[idx1] = func() graphql.Marshaler {
4622
4623 return ec._OperationEdge(ctx, field.Selections, &res[idx1])
4624 }()
4625 }
4626 if isLen1 {
4627 f(idx1)
4628 } else {
4629 go f(idx1)
4630 }
4631
4632 }
4633 wg.Wait()
4634 return arr1
4635}
4636
4637// nolint: vetshadow
4638func (ec *executionContext) _OperationConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) graphql.Marshaler {
4639 rctx := &graphql.ResolverContext{
4640 Object: "OperationConnection",
4641 Args: nil,
4642 Field: field,
4643 }
4644 ctx = graphql.WithResolverContext(ctx, rctx)
4645 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
4646 return obj.Nodes, nil
4647 })
4648 if resTmp == nil {
4649 if !ec.HasError(rctx) {
4650 ec.Errorf(ctx, "must not be null")
4651 }
4652 return graphql.Null
4653 }
4654 res := resTmp.([]bug.Operation)
4655 rctx.Result = res
4656
4657 arr1 := make(graphql.Array, len(res))
4658 var wg sync.WaitGroup
4659
4660 isLen1 := len(res) == 1
4661 if !isLen1 {
4662 wg.Add(len(res))
4663 }
4664
4665 for idx1 := range res {
4666 idx1 := idx1
4667 rctx := &graphql.ResolverContext{
4668 Index: &idx1,
4669 Result: &res[idx1],
4670 }
4671 ctx := graphql.WithResolverContext(ctx, rctx)
4672 f := func(idx1 int) {
4673 if !isLen1 {
4674 defer wg.Done()
4675 }
4676 arr1[idx1] = func() graphql.Marshaler {
4677
4678 return ec._Operation(ctx, field.Selections, &res[idx1])
4679 }()
4680 }
4681 if isLen1 {
4682 f(idx1)
4683 } else {
4684 go f(idx1)
4685 }
4686
4687 }
4688 wg.Wait()
4689 return arr1
4690}
4691
4692// nolint: vetshadow
4693func (ec *executionContext) _OperationConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) graphql.Marshaler {
4694 rctx := &graphql.ResolverContext{
4695 Object: "OperationConnection",
4696 Args: nil,
4697 Field: field,
4698 }
4699 ctx = graphql.WithResolverContext(ctx, rctx)
4700 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
4701 return obj.PageInfo, nil
4702 })
4703 if resTmp == nil {
4704 if !ec.HasError(rctx) {
4705 ec.Errorf(ctx, "must not be null")
4706 }
4707 return graphql.Null
4708 }
4709 res := resTmp.(models.PageInfo)
4710 rctx.Result = res
4711
4712 return ec._PageInfo(ctx, field.Selections, &res)
4713}
4714
4715// nolint: vetshadow
4716func (ec *executionContext) _OperationConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) graphql.Marshaler {
4717 rctx := &graphql.ResolverContext{
4718 Object: "OperationConnection",
4719 Args: nil,
4720 Field: field,
4721 }
4722 ctx = graphql.WithResolverContext(ctx, rctx)
4723 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
4724 return obj.TotalCount, nil
4725 })
4726 if resTmp == nil {
4727 if !ec.HasError(rctx) {
4728 ec.Errorf(ctx, "must not be null")
4729 }
4730 return graphql.Null
4731 }
4732 res := resTmp.(int)
4733 rctx.Result = res
4734 return graphql.MarshalInt(res)
4735}
4736
4737var operationEdgeImplementors = []string{"OperationEdge"}
4738
4739// nolint: gocyclo, errcheck, gas, goconst
4740func (ec *executionContext) _OperationEdge(ctx context.Context, sel ast.SelectionSet, obj *models.OperationEdge) graphql.Marshaler {
4741 fields := graphql.CollectFields(ctx, sel, operationEdgeImplementors)
4742
4743 out := graphql.NewOrderedMap(len(fields))
4744 invalid := false
4745 for i, field := range fields {
4746 out.Keys[i] = field.Alias
4747
4748 switch field.Name {
4749 case "__typename":
4750 out.Values[i] = graphql.MarshalString("OperationEdge")
4751 case "cursor":
4752 out.Values[i] = ec._OperationEdge_cursor(ctx, field, obj)
4753 if out.Values[i] == graphql.Null {
4754 invalid = true
4755 }
4756 case "node":
4757 out.Values[i] = ec._OperationEdge_node(ctx, field, obj)
4758 if out.Values[i] == graphql.Null {
4759 invalid = true
4760 }
4761 default:
4762 panic("unknown field " + strconv.Quote(field.Name))
4763 }
4764 }
4765
4766 if invalid {
4767 return graphql.Null
4768 }
4769 return out
4770}
4771
4772// nolint: vetshadow
4773func (ec *executionContext) _OperationEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.OperationEdge) graphql.Marshaler {
4774 rctx := &graphql.ResolverContext{
4775 Object: "OperationEdge",
4776 Args: nil,
4777 Field: field,
4778 }
4779 ctx = graphql.WithResolverContext(ctx, rctx)
4780 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
4781 return obj.Cursor, nil
4782 })
4783 if resTmp == nil {
4784 if !ec.HasError(rctx) {
4785 ec.Errorf(ctx, "must not be null")
4786 }
4787 return graphql.Null
4788 }
4789 res := resTmp.(string)
4790 rctx.Result = res
4791 return graphql.MarshalString(res)
4792}
4793
4794// nolint: vetshadow
4795func (ec *executionContext) _OperationEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.OperationEdge) graphql.Marshaler {
4796 rctx := &graphql.ResolverContext{
4797 Object: "OperationEdge",
4798 Args: nil,
4799 Field: field,
4800 }
4801 ctx = graphql.WithResolverContext(ctx, rctx)
4802 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
4803 return obj.Node, nil
4804 })
4805 if resTmp == nil {
4806 if !ec.HasError(rctx) {
4807 ec.Errorf(ctx, "must not be null")
4808 }
4809 return graphql.Null
4810 }
4811 res := resTmp.(bug.Operation)
4812 rctx.Result = res
4813
4814 return ec._Operation(ctx, field.Selections, &res)
4815}
4816
4817var pageInfoImplementors = []string{"PageInfo"}
4818
4819// nolint: gocyclo, errcheck, gas, goconst
4820func (ec *executionContext) _PageInfo(ctx context.Context, sel ast.SelectionSet, obj *models.PageInfo) graphql.Marshaler {
4821 fields := graphql.CollectFields(ctx, sel, pageInfoImplementors)
4822
4823 out := graphql.NewOrderedMap(len(fields))
4824 invalid := false
4825 for i, field := range fields {
4826 out.Keys[i] = field.Alias
4827
4828 switch field.Name {
4829 case "__typename":
4830 out.Values[i] = graphql.MarshalString("PageInfo")
4831 case "hasNextPage":
4832 out.Values[i] = ec._PageInfo_hasNextPage(ctx, field, obj)
4833 if out.Values[i] == graphql.Null {
4834 invalid = true
4835 }
4836 case "hasPreviousPage":
4837 out.Values[i] = ec._PageInfo_hasPreviousPage(ctx, field, obj)
4838 if out.Values[i] == graphql.Null {
4839 invalid = true
4840 }
4841 case "startCursor":
4842 out.Values[i] = ec._PageInfo_startCursor(ctx, field, obj)
4843 if out.Values[i] == graphql.Null {
4844 invalid = true
4845 }
4846 case "endCursor":
4847 out.Values[i] = ec._PageInfo_endCursor(ctx, field, obj)
4848 if out.Values[i] == graphql.Null {
4849 invalid = true
4850 }
4851 default:
4852 panic("unknown field " + strconv.Quote(field.Name))
4853 }
4854 }
4855
4856 if invalid {
4857 return graphql.Null
4858 }
4859 return out
4860}
4861
4862// nolint: vetshadow
4863func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) graphql.Marshaler {
4864 rctx := &graphql.ResolverContext{
4865 Object: "PageInfo",
4866 Args: nil,
4867 Field: field,
4868 }
4869 ctx = graphql.WithResolverContext(ctx, rctx)
4870 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
4871 return obj.HasNextPage, nil
4872 })
4873 if resTmp == nil {
4874 if !ec.HasError(rctx) {
4875 ec.Errorf(ctx, "must not be null")
4876 }
4877 return graphql.Null
4878 }
4879 res := resTmp.(bool)
4880 rctx.Result = res
4881 return graphql.MarshalBoolean(res)
4882}
4883
4884// nolint: vetshadow
4885func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) graphql.Marshaler {
4886 rctx := &graphql.ResolverContext{
4887 Object: "PageInfo",
4888 Args: nil,
4889 Field: field,
4890 }
4891 ctx = graphql.WithResolverContext(ctx, rctx)
4892 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
4893 return obj.HasPreviousPage, nil
4894 })
4895 if resTmp == nil {
4896 if !ec.HasError(rctx) {
4897 ec.Errorf(ctx, "must not be null")
4898 }
4899 return graphql.Null
4900 }
4901 res := resTmp.(bool)
4902 rctx.Result = res
4903 return graphql.MarshalBoolean(res)
4904}
4905
4906// nolint: vetshadow
4907func (ec *executionContext) _PageInfo_startCursor(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) graphql.Marshaler {
4908 rctx := &graphql.ResolverContext{
4909 Object: "PageInfo",
4910 Args: nil,
4911 Field: field,
4912 }
4913 ctx = graphql.WithResolverContext(ctx, rctx)
4914 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
4915 return obj.StartCursor, nil
4916 })
4917 if resTmp == nil {
4918 if !ec.HasError(rctx) {
4919 ec.Errorf(ctx, "must not be null")
4920 }
4921 return graphql.Null
4922 }
4923 res := resTmp.(string)
4924 rctx.Result = res
4925 return graphql.MarshalString(res)
4926}
4927
4928// nolint: vetshadow
4929func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) graphql.Marshaler {
4930 rctx := &graphql.ResolverContext{
4931 Object: "PageInfo",
4932 Args: nil,
4933 Field: field,
4934 }
4935 ctx = graphql.WithResolverContext(ctx, rctx)
4936 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
4937 return obj.EndCursor, nil
4938 })
4939 if resTmp == nil {
4940 if !ec.HasError(rctx) {
4941 ec.Errorf(ctx, "must not be null")
4942 }
4943 return graphql.Null
4944 }
4945 res := resTmp.(string)
4946 rctx.Result = res
4947 return graphql.MarshalString(res)
4948}
4949
4950var personImplementors = []string{"Person"}
4951
4952// nolint: gocyclo, errcheck, gas, goconst
4953func (ec *executionContext) _Person(ctx context.Context, sel ast.SelectionSet, obj *bug.Person) graphql.Marshaler {
4954 fields := graphql.CollectFields(ctx, sel, personImplementors)
4955
4956 out := graphql.NewOrderedMap(len(fields))
4957 invalid := false
4958 for i, field := range fields {
4959 out.Keys[i] = field.Alias
4960
4961 switch field.Name {
4962 case "__typename":
4963 out.Values[i] = graphql.MarshalString("Person")
4964 case "email":
4965 out.Values[i] = ec._Person_email(ctx, field, obj)
4966 case "name":
4967 out.Values[i] = ec._Person_name(ctx, field, obj)
4968 if out.Values[i] == graphql.Null {
4969 invalid = true
4970 }
4971 case "avatarUrl":
4972 out.Values[i] = ec._Person_avatarUrl(ctx, field, obj)
4973 default:
4974 panic("unknown field " + strconv.Quote(field.Name))
4975 }
4976 }
4977
4978 if invalid {
4979 return graphql.Null
4980 }
4981 return out
4982}
4983
4984// nolint: vetshadow
4985func (ec *executionContext) _Person_email(ctx context.Context, field graphql.CollectedField, obj *bug.Person) graphql.Marshaler {
4986 rctx := &graphql.ResolverContext{
4987 Object: "Person",
4988 Args: nil,
4989 Field: field,
4990 }
4991 ctx = graphql.WithResolverContext(ctx, rctx)
4992 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
4993 return obj.Email, nil
4994 })
4995 if resTmp == nil {
4996 return graphql.Null
4997 }
4998 res := resTmp.(string)
4999 rctx.Result = res
5000 return graphql.MarshalString(res)
5001}
5002
5003// nolint: vetshadow
5004func (ec *executionContext) _Person_name(ctx context.Context, field graphql.CollectedField, obj *bug.Person) graphql.Marshaler {
5005 rctx := &graphql.ResolverContext{
5006 Object: "Person",
5007 Args: nil,
5008 Field: field,
5009 }
5010 ctx = graphql.WithResolverContext(ctx, rctx)
5011 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
5012 return obj.Name, nil
5013 })
5014 if resTmp == nil {
5015 if !ec.HasError(rctx) {
5016 ec.Errorf(ctx, "must not be null")
5017 }
5018 return graphql.Null
5019 }
5020 res := resTmp.(string)
5021 rctx.Result = res
5022 return graphql.MarshalString(res)
5023}
5024
5025// nolint: vetshadow
5026func (ec *executionContext) _Person_avatarUrl(ctx context.Context, field graphql.CollectedField, obj *bug.Person) graphql.Marshaler {
5027 rctx := &graphql.ResolverContext{
5028 Object: "Person",
5029 Args: nil,
5030 Field: field,
5031 }
5032 ctx = graphql.WithResolverContext(ctx, rctx)
5033 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
5034 return obj.AvatarUrl, nil
5035 })
5036 if resTmp == nil {
5037 return graphql.Null
5038 }
5039 res := resTmp.(string)
5040 rctx.Result = res
5041 return graphql.MarshalString(res)
5042}
5043
5044var queryImplementors = []string{"Query"}
5045
5046// nolint: gocyclo, errcheck, gas, goconst
5047func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
5048 fields := graphql.CollectFields(ctx, sel, queryImplementors)
5049
5050 ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
5051 Object: "Query",
5052 })
5053
5054 var wg sync.WaitGroup
5055 out := graphql.NewOrderedMap(len(fields))
5056 invalid := false
5057 for i, field := range fields {
5058 out.Keys[i] = field.Alias
5059
5060 switch field.Name {
5061 case "__typename":
5062 out.Values[i] = graphql.MarshalString("Query")
5063 case "defaultRepository":
5064 wg.Add(1)
5065 go func(i int, field graphql.CollectedField) {
5066 out.Values[i] = ec._Query_defaultRepository(ctx, field)
5067 wg.Done()
5068 }(i, field)
5069 case "repository":
5070 wg.Add(1)
5071 go func(i int, field graphql.CollectedField) {
5072 out.Values[i] = ec._Query_repository(ctx, field)
5073 wg.Done()
5074 }(i, field)
5075 case "__type":
5076 out.Values[i] = ec._Query___type(ctx, field)
5077 case "__schema":
5078 out.Values[i] = ec._Query___schema(ctx, field)
5079 default:
5080 panic("unknown field " + strconv.Quote(field.Name))
5081 }
5082 }
5083 wg.Wait()
5084 if invalid {
5085 return graphql.Null
5086 }
5087 return out
5088}
5089
5090// nolint: vetshadow
5091func (ec *executionContext) _Query_defaultRepository(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
5092 rctx := &graphql.ResolverContext{
5093 Object: "Query",
5094 Args: nil,
5095 Field: field,
5096 }
5097 ctx = graphql.WithResolverContext(ctx, rctx)
5098 resTmp := ec.FieldMiddleware(ctx, nil, func(ctx context.Context) (interface{}, error) {
5099 return ec.resolvers.Query().DefaultRepository(ctx)
5100 })
5101 if resTmp == nil {
5102 return graphql.Null
5103 }
5104 res := resTmp.(*models.Repository)
5105 rctx.Result = res
5106
5107 if res == nil {
5108 return graphql.Null
5109 }
5110
5111 return ec._Repository(ctx, field.Selections, res)
5112}
5113
5114// nolint: vetshadow
5115func (ec *executionContext) _Query_repository(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
5116 rawArgs := field.ArgumentMap(ec.Variables)
5117 args, err := field_Query_repository_args(rawArgs)
5118 if err != nil {
5119 ec.Error(ctx, err)
5120 return graphql.Null
5121 }
5122 rctx := &graphql.ResolverContext{
5123 Object: "Query",
5124 Args: args,
5125 Field: field,
5126 }
5127 ctx = graphql.WithResolverContext(ctx, rctx)
5128 resTmp := ec.FieldMiddleware(ctx, nil, func(ctx context.Context) (interface{}, error) {
5129 return ec.resolvers.Query().Repository(ctx, args["id"].(string))
5130 })
5131 if resTmp == nil {
5132 return graphql.Null
5133 }
5134 res := resTmp.(*models.Repository)
5135 rctx.Result = res
5136
5137 if res == nil {
5138 return graphql.Null
5139 }
5140
5141 return ec._Repository(ctx, field.Selections, res)
5142}
5143
5144// nolint: vetshadow
5145func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
5146 rawArgs := field.ArgumentMap(ec.Variables)
5147 args, err := field_Query___type_args(rawArgs)
5148 if err != nil {
5149 ec.Error(ctx, err)
5150 return graphql.Null
5151 }
5152 rctx := &graphql.ResolverContext{
5153 Object: "Query",
5154 Args: args,
5155 Field: field,
5156 }
5157 ctx = graphql.WithResolverContext(ctx, rctx)
5158 resTmp := ec.FieldMiddleware(ctx, nil, func(ctx context.Context) (interface{}, error) {
5159 return ec.introspectType(args["name"].(string)), nil
5160 })
5161 if resTmp == nil {
5162 return graphql.Null
5163 }
5164 res := resTmp.(*introspection.Type)
5165 rctx.Result = res
5166
5167 if res == nil {
5168 return graphql.Null
5169 }
5170
5171 return ec.___Type(ctx, field.Selections, res)
5172}
5173
5174// nolint: vetshadow
5175func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
5176 rctx := &graphql.ResolverContext{
5177 Object: "Query",
5178 Args: nil,
5179 Field: field,
5180 }
5181 ctx = graphql.WithResolverContext(ctx, rctx)
5182 resTmp := ec.FieldMiddleware(ctx, nil, func(ctx context.Context) (interface{}, error) {
5183 return ec.introspectSchema(), nil
5184 })
5185 if resTmp == nil {
5186 return graphql.Null
5187 }
5188 res := resTmp.(*introspection.Schema)
5189 rctx.Result = res
5190
5191 if res == nil {
5192 return graphql.Null
5193 }
5194
5195 return ec.___Schema(ctx, field.Selections, res)
5196}
5197
5198var repositoryImplementors = []string{"Repository"}
5199
5200// nolint: gocyclo, errcheck, gas, goconst
5201func (ec *executionContext) _Repository(ctx context.Context, sel ast.SelectionSet, obj *models.Repository) graphql.Marshaler {
5202 fields := graphql.CollectFields(ctx, sel, repositoryImplementors)
5203
5204 var wg sync.WaitGroup
5205 out := graphql.NewOrderedMap(len(fields))
5206 invalid := false
5207 for i, field := range fields {
5208 out.Keys[i] = field.Alias
5209
5210 switch field.Name {
5211 case "__typename":
5212 out.Values[i] = graphql.MarshalString("Repository")
5213 case "allBugs":
5214 wg.Add(1)
5215 go func(i int, field graphql.CollectedField) {
5216 out.Values[i] = ec._Repository_allBugs(ctx, field, obj)
5217 if out.Values[i] == graphql.Null {
5218 invalid = true
5219 }
5220 wg.Done()
5221 }(i, field)
5222 case "bug":
5223 wg.Add(1)
5224 go func(i int, field graphql.CollectedField) {
5225 out.Values[i] = ec._Repository_bug(ctx, field, obj)
5226 wg.Done()
5227 }(i, field)
5228 default:
5229 panic("unknown field " + strconv.Quote(field.Name))
5230 }
5231 }
5232 wg.Wait()
5233 if invalid {
5234 return graphql.Null
5235 }
5236 return out
5237}
5238
5239// nolint: vetshadow
5240func (ec *executionContext) _Repository_allBugs(ctx context.Context, field graphql.CollectedField, obj *models.Repository) graphql.Marshaler {
5241 rawArgs := field.ArgumentMap(ec.Variables)
5242 args, err := field_Repository_allBugs_args(rawArgs)
5243 if err != nil {
5244 ec.Error(ctx, err)
5245 return graphql.Null
5246 }
5247 rctx := &graphql.ResolverContext{
5248 Object: "Repository",
5249 Args: args,
5250 Field: field,
5251 }
5252 ctx = graphql.WithResolverContext(ctx, rctx)
5253 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
5254 return ec.resolvers.Repository().AllBugs(ctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int), args["query"].(*string))
5255 })
5256 if resTmp == nil {
5257 if !ec.HasError(rctx) {
5258 ec.Errorf(ctx, "must not be null")
5259 }
5260 return graphql.Null
5261 }
5262 res := resTmp.(models.BugConnection)
5263 rctx.Result = res
5264
5265 return ec._BugConnection(ctx, field.Selections, &res)
5266}
5267
5268// nolint: vetshadow
5269func (ec *executionContext) _Repository_bug(ctx context.Context, field graphql.CollectedField, obj *models.Repository) graphql.Marshaler {
5270 rawArgs := field.ArgumentMap(ec.Variables)
5271 args, err := field_Repository_bug_args(rawArgs)
5272 if err != nil {
5273 ec.Error(ctx, err)
5274 return graphql.Null
5275 }
5276 rctx := &graphql.ResolverContext{
5277 Object: "Repository",
5278 Args: args,
5279 Field: field,
5280 }
5281 ctx = graphql.WithResolverContext(ctx, rctx)
5282 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
5283 return ec.resolvers.Repository().Bug(ctx, obj, args["prefix"].(string))
5284 })
5285 if resTmp == nil {
5286 return graphql.Null
5287 }
5288 res := resTmp.(*bug.Snapshot)
5289 rctx.Result = res
5290
5291 if res == nil {
5292 return graphql.Null
5293 }
5294
5295 return ec._Bug(ctx, field.Selections, res)
5296}
5297
5298var setStatusOperationImplementors = []string{"SetStatusOperation", "Operation", "Authored"}
5299
5300// nolint: gocyclo, errcheck, gas, goconst
5301func (ec *executionContext) _SetStatusOperation(ctx context.Context, sel ast.SelectionSet, obj *bug.SetStatusOperation) graphql.Marshaler {
5302 fields := graphql.CollectFields(ctx, sel, setStatusOperationImplementors)
5303
5304 var wg sync.WaitGroup
5305 out := graphql.NewOrderedMap(len(fields))
5306 invalid := false
5307 for i, field := range fields {
5308 out.Keys[i] = field.Alias
5309
5310 switch field.Name {
5311 case "__typename":
5312 out.Values[i] = graphql.MarshalString("SetStatusOperation")
5313 case "hash":
5314 out.Values[i] = ec._SetStatusOperation_hash(ctx, field, obj)
5315 if out.Values[i] == graphql.Null {
5316 invalid = true
5317 }
5318 case "author":
5319 out.Values[i] = ec._SetStatusOperation_author(ctx, field, obj)
5320 if out.Values[i] == graphql.Null {
5321 invalid = true
5322 }
5323 case "date":
5324 wg.Add(1)
5325 go func(i int, field graphql.CollectedField) {
5326 out.Values[i] = ec._SetStatusOperation_date(ctx, field, obj)
5327 if out.Values[i] == graphql.Null {
5328 invalid = true
5329 }
5330 wg.Done()
5331 }(i, field)
5332 case "status":
5333 wg.Add(1)
5334 go func(i int, field graphql.CollectedField) {
5335 out.Values[i] = ec._SetStatusOperation_status(ctx, field, obj)
5336 if out.Values[i] == graphql.Null {
5337 invalid = true
5338 }
5339 wg.Done()
5340 }(i, field)
5341 default:
5342 panic("unknown field " + strconv.Quote(field.Name))
5343 }
5344 }
5345 wg.Wait()
5346 if invalid {
5347 return graphql.Null
5348 }
5349 return out
5350}
5351
5352// nolint: vetshadow
5353func (ec *executionContext) _SetStatusOperation_hash(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusOperation) graphql.Marshaler {
5354 rctx := &graphql.ResolverContext{
5355 Object: "SetStatusOperation",
5356 Args: nil,
5357 Field: field,
5358 }
5359 ctx = graphql.WithResolverContext(ctx, rctx)
5360 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
5361 return obj.Hash()
5362 })
5363 if resTmp == nil {
5364 if !ec.HasError(rctx) {
5365 ec.Errorf(ctx, "must not be null")
5366 }
5367 return graphql.Null
5368 }
5369 res := resTmp.(git.Hash)
5370 rctx.Result = res
5371 return res
5372}
5373
5374// nolint: vetshadow
5375func (ec *executionContext) _SetStatusOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusOperation) graphql.Marshaler {
5376 rctx := &graphql.ResolverContext{
5377 Object: "SetStatusOperation",
5378 Args: nil,
5379 Field: field,
5380 }
5381 ctx = graphql.WithResolverContext(ctx, rctx)
5382 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
5383 return obj.Author, nil
5384 })
5385 if resTmp == nil {
5386 if !ec.HasError(rctx) {
5387 ec.Errorf(ctx, "must not be null")
5388 }
5389 return graphql.Null
5390 }
5391 res := resTmp.(bug.Person)
5392 rctx.Result = res
5393
5394 return ec._Person(ctx, field.Selections, &res)
5395}
5396
5397// nolint: vetshadow
5398func (ec *executionContext) _SetStatusOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusOperation) graphql.Marshaler {
5399 rctx := &graphql.ResolverContext{
5400 Object: "SetStatusOperation",
5401 Args: nil,
5402 Field: field,
5403 }
5404 ctx = graphql.WithResolverContext(ctx, rctx)
5405 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
5406 return ec.resolvers.SetStatusOperation().Date(ctx, obj)
5407 })
5408 if resTmp == nil {
5409 if !ec.HasError(rctx) {
5410 ec.Errorf(ctx, "must not be null")
5411 }
5412 return graphql.Null
5413 }
5414 res := resTmp.(time.Time)
5415 rctx.Result = res
5416 return graphql.MarshalTime(res)
5417}
5418
5419// nolint: vetshadow
5420func (ec *executionContext) _SetStatusOperation_status(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusOperation) graphql.Marshaler {
5421 rctx := &graphql.ResolverContext{
5422 Object: "SetStatusOperation",
5423 Args: nil,
5424 Field: field,
5425 }
5426 ctx = graphql.WithResolverContext(ctx, rctx)
5427 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
5428 return ec.resolvers.SetStatusOperation().Status(ctx, obj)
5429 })
5430 if resTmp == nil {
5431 if !ec.HasError(rctx) {
5432 ec.Errorf(ctx, "must not be null")
5433 }
5434 return graphql.Null
5435 }
5436 res := resTmp.(models.Status)
5437 rctx.Result = res
5438 return res
5439}
5440
5441var setStatusTimelineItemImplementors = []string{"SetStatusTimelineItem", "TimelineItem"}
5442
5443// nolint: gocyclo, errcheck, gas, goconst
5444func (ec *executionContext) _SetStatusTimelineItem(ctx context.Context, sel ast.SelectionSet, obj *bug.SetStatusTimelineItem) graphql.Marshaler {
5445 fields := graphql.CollectFields(ctx, sel, setStatusTimelineItemImplementors)
5446
5447 var wg sync.WaitGroup
5448 out := graphql.NewOrderedMap(len(fields))
5449 invalid := false
5450 for i, field := range fields {
5451 out.Keys[i] = field.Alias
5452
5453 switch field.Name {
5454 case "__typename":
5455 out.Values[i] = graphql.MarshalString("SetStatusTimelineItem")
5456 case "hash":
5457 out.Values[i] = ec._SetStatusTimelineItem_hash(ctx, field, obj)
5458 if out.Values[i] == graphql.Null {
5459 invalid = true
5460 }
5461 case "author":
5462 out.Values[i] = ec._SetStatusTimelineItem_author(ctx, field, obj)
5463 if out.Values[i] == graphql.Null {
5464 invalid = true
5465 }
5466 case "date":
5467 wg.Add(1)
5468 go func(i int, field graphql.CollectedField) {
5469 out.Values[i] = ec._SetStatusTimelineItem_date(ctx, field, obj)
5470 if out.Values[i] == graphql.Null {
5471 invalid = true
5472 }
5473 wg.Done()
5474 }(i, field)
5475 case "status":
5476 wg.Add(1)
5477 go func(i int, field graphql.CollectedField) {
5478 out.Values[i] = ec._SetStatusTimelineItem_status(ctx, field, obj)
5479 if out.Values[i] == graphql.Null {
5480 invalid = true
5481 }
5482 wg.Done()
5483 }(i, field)
5484 default:
5485 panic("unknown field " + strconv.Quote(field.Name))
5486 }
5487 }
5488 wg.Wait()
5489 if invalid {
5490 return graphql.Null
5491 }
5492 return out
5493}
5494
5495// nolint: vetshadow
5496func (ec *executionContext) _SetStatusTimelineItem_hash(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusTimelineItem) graphql.Marshaler {
5497 rctx := &graphql.ResolverContext{
5498 Object: "SetStatusTimelineItem",
5499 Args: nil,
5500 Field: field,
5501 }
5502 ctx = graphql.WithResolverContext(ctx, rctx)
5503 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
5504 return obj.Hash(), nil
5505 })
5506 if resTmp == nil {
5507 if !ec.HasError(rctx) {
5508 ec.Errorf(ctx, "must not be null")
5509 }
5510 return graphql.Null
5511 }
5512 res := resTmp.(git.Hash)
5513 rctx.Result = res
5514 return res
5515}
5516
5517// nolint: vetshadow
5518func (ec *executionContext) _SetStatusTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusTimelineItem) graphql.Marshaler {
5519 rctx := &graphql.ResolverContext{
5520 Object: "SetStatusTimelineItem",
5521 Args: nil,
5522 Field: field,
5523 }
5524 ctx = graphql.WithResolverContext(ctx, rctx)
5525 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
5526 return obj.Author, nil
5527 })
5528 if resTmp == nil {
5529 if !ec.HasError(rctx) {
5530 ec.Errorf(ctx, "must not be null")
5531 }
5532 return graphql.Null
5533 }
5534 res := resTmp.(bug.Person)
5535 rctx.Result = res
5536
5537 return ec._Person(ctx, field.Selections, &res)
5538}
5539
5540// nolint: vetshadow
5541func (ec *executionContext) _SetStatusTimelineItem_date(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusTimelineItem) graphql.Marshaler {
5542 rctx := &graphql.ResolverContext{
5543 Object: "SetStatusTimelineItem",
5544 Args: nil,
5545 Field: field,
5546 }
5547 ctx = graphql.WithResolverContext(ctx, rctx)
5548 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
5549 return ec.resolvers.SetStatusTimelineItem().Date(ctx, obj)
5550 })
5551 if resTmp == nil {
5552 if !ec.HasError(rctx) {
5553 ec.Errorf(ctx, "must not be null")
5554 }
5555 return graphql.Null
5556 }
5557 res := resTmp.(time.Time)
5558 rctx.Result = res
5559 return graphql.MarshalTime(res)
5560}
5561
5562// nolint: vetshadow
5563func (ec *executionContext) _SetStatusTimelineItem_status(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusTimelineItem) graphql.Marshaler {
5564 rctx := &graphql.ResolverContext{
5565 Object: "SetStatusTimelineItem",
5566 Args: nil,
5567 Field: field,
5568 }
5569 ctx = graphql.WithResolverContext(ctx, rctx)
5570 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
5571 return ec.resolvers.SetStatusTimelineItem().Status(ctx, obj)
5572 })
5573 if resTmp == nil {
5574 if !ec.HasError(rctx) {
5575 ec.Errorf(ctx, "must not be null")
5576 }
5577 return graphql.Null
5578 }
5579 res := resTmp.(models.Status)
5580 rctx.Result = res
5581 return res
5582}
5583
5584var setTitleOperationImplementors = []string{"SetTitleOperation", "Operation", "Authored"}
5585
5586// nolint: gocyclo, errcheck, gas, goconst
5587func (ec *executionContext) _SetTitleOperation(ctx context.Context, sel ast.SelectionSet, obj *bug.SetTitleOperation) graphql.Marshaler {
5588 fields := graphql.CollectFields(ctx, sel, setTitleOperationImplementors)
5589
5590 var wg sync.WaitGroup
5591 out := graphql.NewOrderedMap(len(fields))
5592 invalid := false
5593 for i, field := range fields {
5594 out.Keys[i] = field.Alias
5595
5596 switch field.Name {
5597 case "__typename":
5598 out.Values[i] = graphql.MarshalString("SetTitleOperation")
5599 case "hash":
5600 out.Values[i] = ec._SetTitleOperation_hash(ctx, field, obj)
5601 if out.Values[i] == graphql.Null {
5602 invalid = true
5603 }
5604 case "author":
5605 out.Values[i] = ec._SetTitleOperation_author(ctx, field, obj)
5606 if out.Values[i] == graphql.Null {
5607 invalid = true
5608 }
5609 case "date":
5610 wg.Add(1)
5611 go func(i int, field graphql.CollectedField) {
5612 out.Values[i] = ec._SetTitleOperation_date(ctx, field, obj)
5613 if out.Values[i] == graphql.Null {
5614 invalid = true
5615 }
5616 wg.Done()
5617 }(i, field)
5618 case "title":
5619 out.Values[i] = ec._SetTitleOperation_title(ctx, field, obj)
5620 if out.Values[i] == graphql.Null {
5621 invalid = true
5622 }
5623 case "was":
5624 out.Values[i] = ec._SetTitleOperation_was(ctx, field, obj)
5625 if out.Values[i] == graphql.Null {
5626 invalid = true
5627 }
5628 default:
5629 panic("unknown field " + strconv.Quote(field.Name))
5630 }
5631 }
5632 wg.Wait()
5633 if invalid {
5634 return graphql.Null
5635 }
5636 return out
5637}
5638
5639// nolint: vetshadow
5640func (ec *executionContext) _SetTitleOperation_hash(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) graphql.Marshaler {
5641 rctx := &graphql.ResolverContext{
5642 Object: "SetTitleOperation",
5643 Args: nil,
5644 Field: field,
5645 }
5646 ctx = graphql.WithResolverContext(ctx, rctx)
5647 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
5648 return obj.Hash()
5649 })
5650 if resTmp == nil {
5651 if !ec.HasError(rctx) {
5652 ec.Errorf(ctx, "must not be null")
5653 }
5654 return graphql.Null
5655 }
5656 res := resTmp.(git.Hash)
5657 rctx.Result = res
5658 return res
5659}
5660
5661// nolint: vetshadow
5662func (ec *executionContext) _SetTitleOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) graphql.Marshaler {
5663 rctx := &graphql.ResolverContext{
5664 Object: "SetTitleOperation",
5665 Args: nil,
5666 Field: field,
5667 }
5668 ctx = graphql.WithResolverContext(ctx, rctx)
5669 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
5670 return obj.Author, nil
5671 })
5672 if resTmp == nil {
5673 if !ec.HasError(rctx) {
5674 ec.Errorf(ctx, "must not be null")
5675 }
5676 return graphql.Null
5677 }
5678 res := resTmp.(bug.Person)
5679 rctx.Result = res
5680
5681 return ec._Person(ctx, field.Selections, &res)
5682}
5683
5684// nolint: vetshadow
5685func (ec *executionContext) _SetTitleOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) graphql.Marshaler {
5686 rctx := &graphql.ResolverContext{
5687 Object: "SetTitleOperation",
5688 Args: nil,
5689 Field: field,
5690 }
5691 ctx = graphql.WithResolverContext(ctx, rctx)
5692 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
5693 return ec.resolvers.SetTitleOperation().Date(ctx, obj)
5694 })
5695 if resTmp == nil {
5696 if !ec.HasError(rctx) {
5697 ec.Errorf(ctx, "must not be null")
5698 }
5699 return graphql.Null
5700 }
5701 res := resTmp.(time.Time)
5702 rctx.Result = res
5703 return graphql.MarshalTime(res)
5704}
5705
5706// nolint: vetshadow
5707func (ec *executionContext) _SetTitleOperation_title(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) graphql.Marshaler {
5708 rctx := &graphql.ResolverContext{
5709 Object: "SetTitleOperation",
5710 Args: nil,
5711 Field: field,
5712 }
5713 ctx = graphql.WithResolverContext(ctx, rctx)
5714 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
5715 return obj.Title, nil
5716 })
5717 if resTmp == nil {
5718 if !ec.HasError(rctx) {
5719 ec.Errorf(ctx, "must not be null")
5720 }
5721 return graphql.Null
5722 }
5723 res := resTmp.(string)
5724 rctx.Result = res
5725 return graphql.MarshalString(res)
5726}
5727
5728// nolint: vetshadow
5729func (ec *executionContext) _SetTitleOperation_was(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) graphql.Marshaler {
5730 rctx := &graphql.ResolverContext{
5731 Object: "SetTitleOperation",
5732 Args: nil,
5733 Field: field,
5734 }
5735 ctx = graphql.WithResolverContext(ctx, rctx)
5736 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
5737 return obj.Was, nil
5738 })
5739 if resTmp == nil {
5740 if !ec.HasError(rctx) {
5741 ec.Errorf(ctx, "must not be null")
5742 }
5743 return graphql.Null
5744 }
5745 res := resTmp.(string)
5746 rctx.Result = res
5747 return graphql.MarshalString(res)
5748}
5749
5750var setTitleTimelineItemImplementors = []string{"SetTitleTimelineItem", "TimelineItem"}
5751
5752// nolint: gocyclo, errcheck, gas, goconst
5753func (ec *executionContext) _SetTitleTimelineItem(ctx context.Context, sel ast.SelectionSet, obj *bug.SetTitleTimelineItem) graphql.Marshaler {
5754 fields := graphql.CollectFields(ctx, sel, setTitleTimelineItemImplementors)
5755
5756 var wg sync.WaitGroup
5757 out := graphql.NewOrderedMap(len(fields))
5758 invalid := false
5759 for i, field := range fields {
5760 out.Keys[i] = field.Alias
5761
5762 switch field.Name {
5763 case "__typename":
5764 out.Values[i] = graphql.MarshalString("SetTitleTimelineItem")
5765 case "hash":
5766 out.Values[i] = ec._SetTitleTimelineItem_hash(ctx, field, obj)
5767 if out.Values[i] == graphql.Null {
5768 invalid = true
5769 }
5770 case "author":
5771 out.Values[i] = ec._SetTitleTimelineItem_author(ctx, field, obj)
5772 if out.Values[i] == graphql.Null {
5773 invalid = true
5774 }
5775 case "date":
5776 wg.Add(1)
5777 go func(i int, field graphql.CollectedField) {
5778 out.Values[i] = ec._SetTitleTimelineItem_date(ctx, field, obj)
5779 if out.Values[i] == graphql.Null {
5780 invalid = true
5781 }
5782 wg.Done()
5783 }(i, field)
5784 case "title":
5785 out.Values[i] = ec._SetTitleTimelineItem_title(ctx, field, obj)
5786 if out.Values[i] == graphql.Null {
5787 invalid = true
5788 }
5789 case "was":
5790 out.Values[i] = ec._SetTitleTimelineItem_was(ctx, field, obj)
5791 if out.Values[i] == graphql.Null {
5792 invalid = true
5793 }
5794 default:
5795 panic("unknown field " + strconv.Quote(field.Name))
5796 }
5797 }
5798 wg.Wait()
5799 if invalid {
5800 return graphql.Null
5801 }
5802 return out
5803}
5804
5805// nolint: vetshadow
5806func (ec *executionContext) _SetTitleTimelineItem_hash(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleTimelineItem) graphql.Marshaler {
5807 rctx := &graphql.ResolverContext{
5808 Object: "SetTitleTimelineItem",
5809 Args: nil,
5810 Field: field,
5811 }
5812 ctx = graphql.WithResolverContext(ctx, rctx)
5813 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
5814 return obj.Hash(), nil
5815 })
5816 if resTmp == nil {
5817 if !ec.HasError(rctx) {
5818 ec.Errorf(ctx, "must not be null")
5819 }
5820 return graphql.Null
5821 }
5822 res := resTmp.(git.Hash)
5823 rctx.Result = res
5824 return res
5825}
5826
5827// nolint: vetshadow
5828func (ec *executionContext) _SetTitleTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleTimelineItem) graphql.Marshaler {
5829 rctx := &graphql.ResolverContext{
5830 Object: "SetTitleTimelineItem",
5831 Args: nil,
5832 Field: field,
5833 }
5834 ctx = graphql.WithResolverContext(ctx, rctx)
5835 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
5836 return obj.Author, nil
5837 })
5838 if resTmp == nil {
5839 if !ec.HasError(rctx) {
5840 ec.Errorf(ctx, "must not be null")
5841 }
5842 return graphql.Null
5843 }
5844 res := resTmp.(bug.Person)
5845 rctx.Result = res
5846
5847 return ec._Person(ctx, field.Selections, &res)
5848}
5849
5850// nolint: vetshadow
5851func (ec *executionContext) _SetTitleTimelineItem_date(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleTimelineItem) graphql.Marshaler {
5852 rctx := &graphql.ResolverContext{
5853 Object: "SetTitleTimelineItem",
5854 Args: nil,
5855 Field: field,
5856 }
5857 ctx = graphql.WithResolverContext(ctx, rctx)
5858 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
5859 return ec.resolvers.SetTitleTimelineItem().Date(ctx, obj)
5860 })
5861 if resTmp == nil {
5862 if !ec.HasError(rctx) {
5863 ec.Errorf(ctx, "must not be null")
5864 }
5865 return graphql.Null
5866 }
5867 res := resTmp.(time.Time)
5868 rctx.Result = res
5869 return graphql.MarshalTime(res)
5870}
5871
5872// nolint: vetshadow
5873func (ec *executionContext) _SetTitleTimelineItem_title(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleTimelineItem) graphql.Marshaler {
5874 rctx := &graphql.ResolverContext{
5875 Object: "SetTitleTimelineItem",
5876 Args: nil,
5877 Field: field,
5878 }
5879 ctx = graphql.WithResolverContext(ctx, rctx)
5880 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
5881 return obj.Title, nil
5882 })
5883 if resTmp == nil {
5884 if !ec.HasError(rctx) {
5885 ec.Errorf(ctx, "must not be null")
5886 }
5887 return graphql.Null
5888 }
5889 res := resTmp.(string)
5890 rctx.Result = res
5891 return graphql.MarshalString(res)
5892}
5893
5894// nolint: vetshadow
5895func (ec *executionContext) _SetTitleTimelineItem_was(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleTimelineItem) graphql.Marshaler {
5896 rctx := &graphql.ResolverContext{
5897 Object: "SetTitleTimelineItem",
5898 Args: nil,
5899 Field: field,
5900 }
5901 ctx = graphql.WithResolverContext(ctx, rctx)
5902 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
5903 return obj.Was, nil
5904 })
5905 if resTmp == nil {
5906 if !ec.HasError(rctx) {
5907 ec.Errorf(ctx, "must not be null")
5908 }
5909 return graphql.Null
5910 }
5911 res := resTmp.(string)
5912 rctx.Result = res
5913 return graphql.MarshalString(res)
5914}
5915
5916var timelineItemConnectionImplementors = []string{"TimelineItemConnection"}
5917
5918// nolint: gocyclo, errcheck, gas, goconst
5919func (ec *executionContext) _TimelineItemConnection(ctx context.Context, sel ast.SelectionSet, obj *models.TimelineItemConnection) graphql.Marshaler {
5920 fields := graphql.CollectFields(ctx, sel, timelineItemConnectionImplementors)
5921
5922 out := graphql.NewOrderedMap(len(fields))
5923 invalid := false
5924 for i, field := range fields {
5925 out.Keys[i] = field.Alias
5926
5927 switch field.Name {
5928 case "__typename":
5929 out.Values[i] = graphql.MarshalString("TimelineItemConnection")
5930 case "edges":
5931 out.Values[i] = ec._TimelineItemConnection_edges(ctx, field, obj)
5932 if out.Values[i] == graphql.Null {
5933 invalid = true
5934 }
5935 case "nodes":
5936 out.Values[i] = ec._TimelineItemConnection_nodes(ctx, field, obj)
5937 if out.Values[i] == graphql.Null {
5938 invalid = true
5939 }
5940 case "pageInfo":
5941 out.Values[i] = ec._TimelineItemConnection_pageInfo(ctx, field, obj)
5942 if out.Values[i] == graphql.Null {
5943 invalid = true
5944 }
5945 case "totalCount":
5946 out.Values[i] = ec._TimelineItemConnection_totalCount(ctx, field, obj)
5947 if out.Values[i] == graphql.Null {
5948 invalid = true
5949 }
5950 default:
5951 panic("unknown field " + strconv.Quote(field.Name))
5952 }
5953 }
5954
5955 if invalid {
5956 return graphql.Null
5957 }
5958 return out
5959}
5960
5961// nolint: vetshadow
5962func (ec *executionContext) _TimelineItemConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemConnection) graphql.Marshaler {
5963 rctx := &graphql.ResolverContext{
5964 Object: "TimelineItemConnection",
5965 Args: nil,
5966 Field: field,
5967 }
5968 ctx = graphql.WithResolverContext(ctx, rctx)
5969 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
5970 return obj.Edges, nil
5971 })
5972 if resTmp == nil {
5973 if !ec.HasError(rctx) {
5974 ec.Errorf(ctx, "must not be null")
5975 }
5976 return graphql.Null
5977 }
5978 res := resTmp.([]models.TimelineItemEdge)
5979 rctx.Result = res
5980
5981 arr1 := make(graphql.Array, len(res))
5982 var wg sync.WaitGroup
5983
5984 isLen1 := len(res) == 1
5985 if !isLen1 {
5986 wg.Add(len(res))
5987 }
5988
5989 for idx1 := range res {
5990 idx1 := idx1
5991 rctx := &graphql.ResolverContext{
5992 Index: &idx1,
5993 Result: &res[idx1],
5994 }
5995 ctx := graphql.WithResolverContext(ctx, rctx)
5996 f := func(idx1 int) {
5997 if !isLen1 {
5998 defer wg.Done()
5999 }
6000 arr1[idx1] = func() graphql.Marshaler {
6001
6002 return ec._TimelineItemEdge(ctx, field.Selections, &res[idx1])
6003 }()
6004 }
6005 if isLen1 {
6006 f(idx1)
6007 } else {
6008 go f(idx1)
6009 }
6010
6011 }
6012 wg.Wait()
6013 return arr1
6014}
6015
6016// nolint: vetshadow
6017func (ec *executionContext) _TimelineItemConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemConnection) graphql.Marshaler {
6018 rctx := &graphql.ResolverContext{
6019 Object: "TimelineItemConnection",
6020 Args: nil,
6021 Field: field,
6022 }
6023 ctx = graphql.WithResolverContext(ctx, rctx)
6024 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
6025 return obj.Nodes, nil
6026 })
6027 if resTmp == nil {
6028 if !ec.HasError(rctx) {
6029 ec.Errorf(ctx, "must not be null")
6030 }
6031 return graphql.Null
6032 }
6033 res := resTmp.([]bug.TimelineItem)
6034 rctx.Result = res
6035
6036 arr1 := make(graphql.Array, len(res))
6037 var wg sync.WaitGroup
6038
6039 isLen1 := len(res) == 1
6040 if !isLen1 {
6041 wg.Add(len(res))
6042 }
6043
6044 for idx1 := range res {
6045 idx1 := idx1
6046 rctx := &graphql.ResolverContext{
6047 Index: &idx1,
6048 Result: &res[idx1],
6049 }
6050 ctx := graphql.WithResolverContext(ctx, rctx)
6051 f := func(idx1 int) {
6052 if !isLen1 {
6053 defer wg.Done()
6054 }
6055 arr1[idx1] = func() graphql.Marshaler {
6056
6057 return ec._TimelineItem(ctx, field.Selections, &res[idx1])
6058 }()
6059 }
6060 if isLen1 {
6061 f(idx1)
6062 } else {
6063 go f(idx1)
6064 }
6065
6066 }
6067 wg.Wait()
6068 return arr1
6069}
6070
6071// nolint: vetshadow
6072func (ec *executionContext) _TimelineItemConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemConnection) graphql.Marshaler {
6073 rctx := &graphql.ResolverContext{
6074 Object: "TimelineItemConnection",
6075 Args: nil,
6076 Field: field,
6077 }
6078 ctx = graphql.WithResolverContext(ctx, rctx)
6079 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
6080 return obj.PageInfo, nil
6081 })
6082 if resTmp == nil {
6083 if !ec.HasError(rctx) {
6084 ec.Errorf(ctx, "must not be null")
6085 }
6086 return graphql.Null
6087 }
6088 res := resTmp.(models.PageInfo)
6089 rctx.Result = res
6090
6091 return ec._PageInfo(ctx, field.Selections, &res)
6092}
6093
6094// nolint: vetshadow
6095func (ec *executionContext) _TimelineItemConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemConnection) graphql.Marshaler {
6096 rctx := &graphql.ResolverContext{
6097 Object: "TimelineItemConnection",
6098 Args: nil,
6099 Field: field,
6100 }
6101 ctx = graphql.WithResolverContext(ctx, rctx)
6102 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
6103 return obj.TotalCount, nil
6104 })
6105 if resTmp == nil {
6106 if !ec.HasError(rctx) {
6107 ec.Errorf(ctx, "must not be null")
6108 }
6109 return graphql.Null
6110 }
6111 res := resTmp.(int)
6112 rctx.Result = res
6113 return graphql.MarshalInt(res)
6114}
6115
6116var timelineItemEdgeImplementors = []string{"TimelineItemEdge"}
6117
6118// nolint: gocyclo, errcheck, gas, goconst
6119func (ec *executionContext) _TimelineItemEdge(ctx context.Context, sel ast.SelectionSet, obj *models.TimelineItemEdge) graphql.Marshaler {
6120 fields := graphql.CollectFields(ctx, sel, timelineItemEdgeImplementors)
6121
6122 out := graphql.NewOrderedMap(len(fields))
6123 invalid := false
6124 for i, field := range fields {
6125 out.Keys[i] = field.Alias
6126
6127 switch field.Name {
6128 case "__typename":
6129 out.Values[i] = graphql.MarshalString("TimelineItemEdge")
6130 case "cursor":
6131 out.Values[i] = ec._TimelineItemEdge_cursor(ctx, field, obj)
6132 if out.Values[i] == graphql.Null {
6133 invalid = true
6134 }
6135 case "node":
6136 out.Values[i] = ec._TimelineItemEdge_node(ctx, field, obj)
6137 if out.Values[i] == graphql.Null {
6138 invalid = true
6139 }
6140 default:
6141 panic("unknown field " + strconv.Quote(field.Name))
6142 }
6143 }
6144
6145 if invalid {
6146 return graphql.Null
6147 }
6148 return out
6149}
6150
6151// nolint: vetshadow
6152func (ec *executionContext) _TimelineItemEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemEdge) graphql.Marshaler {
6153 rctx := &graphql.ResolverContext{
6154 Object: "TimelineItemEdge",
6155 Args: nil,
6156 Field: field,
6157 }
6158 ctx = graphql.WithResolverContext(ctx, rctx)
6159 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
6160 return obj.Cursor, nil
6161 })
6162 if resTmp == nil {
6163 if !ec.HasError(rctx) {
6164 ec.Errorf(ctx, "must not be null")
6165 }
6166 return graphql.Null
6167 }
6168 res := resTmp.(string)
6169 rctx.Result = res
6170 return graphql.MarshalString(res)
6171}
6172
6173// nolint: vetshadow
6174func (ec *executionContext) _TimelineItemEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemEdge) graphql.Marshaler {
6175 rctx := &graphql.ResolverContext{
6176 Object: "TimelineItemEdge",
6177 Args: nil,
6178 Field: field,
6179 }
6180 ctx = graphql.WithResolverContext(ctx, rctx)
6181 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
6182 return obj.Node, nil
6183 })
6184 if resTmp == nil {
6185 if !ec.HasError(rctx) {
6186 ec.Errorf(ctx, "must not be null")
6187 }
6188 return graphql.Null
6189 }
6190 res := resTmp.(bug.TimelineItem)
6191 rctx.Result = res
6192
6193 return ec._TimelineItem(ctx, field.Selections, &res)
6194}
6195
6196var __DirectiveImplementors = []string{"__Directive"}
6197
6198// nolint: gocyclo, errcheck, gas, goconst
6199func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler {
6200 fields := graphql.CollectFields(ctx, sel, __DirectiveImplementors)
6201
6202 out := graphql.NewOrderedMap(len(fields))
6203 invalid := false
6204 for i, field := range fields {
6205 out.Keys[i] = field.Alias
6206
6207 switch field.Name {
6208 case "__typename":
6209 out.Values[i] = graphql.MarshalString("__Directive")
6210 case "name":
6211 out.Values[i] = ec.___Directive_name(ctx, field, obj)
6212 if out.Values[i] == graphql.Null {
6213 invalid = true
6214 }
6215 case "description":
6216 out.Values[i] = ec.___Directive_description(ctx, field, obj)
6217 case "locations":
6218 out.Values[i] = ec.___Directive_locations(ctx, field, obj)
6219 if out.Values[i] == graphql.Null {
6220 invalid = true
6221 }
6222 case "args":
6223 out.Values[i] = ec.___Directive_args(ctx, field, obj)
6224 if out.Values[i] == graphql.Null {
6225 invalid = true
6226 }
6227 default:
6228 panic("unknown field " + strconv.Quote(field.Name))
6229 }
6230 }
6231
6232 if invalid {
6233 return graphql.Null
6234 }
6235 return out
6236}
6237
6238// nolint: vetshadow
6239func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler {
6240 rctx := &graphql.ResolverContext{
6241 Object: "__Directive",
6242 Args: nil,
6243 Field: field,
6244 }
6245 ctx = graphql.WithResolverContext(ctx, rctx)
6246 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
6247 return obj.Name, nil
6248 })
6249 if resTmp == nil {
6250 if !ec.HasError(rctx) {
6251 ec.Errorf(ctx, "must not be null")
6252 }
6253 return graphql.Null
6254 }
6255 res := resTmp.(string)
6256 rctx.Result = res
6257 return graphql.MarshalString(res)
6258}
6259
6260// nolint: vetshadow
6261func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler {
6262 rctx := &graphql.ResolverContext{
6263 Object: "__Directive",
6264 Args: nil,
6265 Field: field,
6266 }
6267 ctx = graphql.WithResolverContext(ctx, rctx)
6268 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
6269 return obj.Description, nil
6270 })
6271 if resTmp == nil {
6272 return graphql.Null
6273 }
6274 res := resTmp.(string)
6275 rctx.Result = res
6276 return graphql.MarshalString(res)
6277}
6278
6279// nolint: vetshadow
6280func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler {
6281 rctx := &graphql.ResolverContext{
6282 Object: "__Directive",
6283 Args: nil,
6284 Field: field,
6285 }
6286 ctx = graphql.WithResolverContext(ctx, rctx)
6287 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
6288 return obj.Locations, nil
6289 })
6290 if resTmp == nil {
6291 if !ec.HasError(rctx) {
6292 ec.Errorf(ctx, "must not be null")
6293 }
6294 return graphql.Null
6295 }
6296 res := resTmp.([]string)
6297 rctx.Result = res
6298
6299 arr1 := make(graphql.Array, len(res))
6300
6301 for idx1 := range res {
6302 arr1[idx1] = func() graphql.Marshaler {
6303 return graphql.MarshalString(res[idx1])
6304 }()
6305 }
6306
6307 return arr1
6308}
6309
6310// nolint: vetshadow
6311func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler {
6312 rctx := &graphql.ResolverContext{
6313 Object: "__Directive",
6314 Args: nil,
6315 Field: field,
6316 }
6317 ctx = graphql.WithResolverContext(ctx, rctx)
6318 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
6319 return obj.Args, nil
6320 })
6321 if resTmp == nil {
6322 if !ec.HasError(rctx) {
6323 ec.Errorf(ctx, "must not be null")
6324 }
6325 return graphql.Null
6326 }
6327 res := resTmp.([]introspection.InputValue)
6328 rctx.Result = res
6329
6330 arr1 := make(graphql.Array, len(res))
6331 var wg sync.WaitGroup
6332
6333 isLen1 := len(res) == 1
6334 if !isLen1 {
6335 wg.Add(len(res))
6336 }
6337
6338 for idx1 := range res {
6339 idx1 := idx1
6340 rctx := &graphql.ResolverContext{
6341 Index: &idx1,
6342 Result: &res[idx1],
6343 }
6344 ctx := graphql.WithResolverContext(ctx, rctx)
6345 f := func(idx1 int) {
6346 if !isLen1 {
6347 defer wg.Done()
6348 }
6349 arr1[idx1] = func() graphql.Marshaler {
6350
6351 return ec.___InputValue(ctx, field.Selections, &res[idx1])
6352 }()
6353 }
6354 if isLen1 {
6355 f(idx1)
6356 } else {
6357 go f(idx1)
6358 }
6359
6360 }
6361 wg.Wait()
6362 return arr1
6363}
6364
6365var __EnumValueImplementors = []string{"__EnumValue"}
6366
6367// nolint: gocyclo, errcheck, gas, goconst
6368func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler {
6369 fields := graphql.CollectFields(ctx, sel, __EnumValueImplementors)
6370
6371 out := graphql.NewOrderedMap(len(fields))
6372 invalid := false
6373 for i, field := range fields {
6374 out.Keys[i] = field.Alias
6375
6376 switch field.Name {
6377 case "__typename":
6378 out.Values[i] = graphql.MarshalString("__EnumValue")
6379 case "name":
6380 out.Values[i] = ec.___EnumValue_name(ctx, field, obj)
6381 if out.Values[i] == graphql.Null {
6382 invalid = true
6383 }
6384 case "description":
6385 out.Values[i] = ec.___EnumValue_description(ctx, field, obj)
6386 case "isDeprecated":
6387 out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj)
6388 if out.Values[i] == graphql.Null {
6389 invalid = true
6390 }
6391 case "deprecationReason":
6392 out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj)
6393 default:
6394 panic("unknown field " + strconv.Quote(field.Name))
6395 }
6396 }
6397
6398 if invalid {
6399 return graphql.Null
6400 }
6401 return out
6402}
6403
6404// nolint: vetshadow
6405func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler {
6406 rctx := &graphql.ResolverContext{
6407 Object: "__EnumValue",
6408 Args: nil,
6409 Field: field,
6410 }
6411 ctx = graphql.WithResolverContext(ctx, rctx)
6412 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
6413 return obj.Name, nil
6414 })
6415 if resTmp == nil {
6416 if !ec.HasError(rctx) {
6417 ec.Errorf(ctx, "must not be null")
6418 }
6419 return graphql.Null
6420 }
6421 res := resTmp.(string)
6422 rctx.Result = res
6423 return graphql.MarshalString(res)
6424}
6425
6426// nolint: vetshadow
6427func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler {
6428 rctx := &graphql.ResolverContext{
6429 Object: "__EnumValue",
6430 Args: nil,
6431 Field: field,
6432 }
6433 ctx = graphql.WithResolverContext(ctx, rctx)
6434 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
6435 return obj.Description, nil
6436 })
6437 if resTmp == nil {
6438 return graphql.Null
6439 }
6440 res := resTmp.(string)
6441 rctx.Result = res
6442 return graphql.MarshalString(res)
6443}
6444
6445// nolint: vetshadow
6446func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler {
6447 rctx := &graphql.ResolverContext{
6448 Object: "__EnumValue",
6449 Args: nil,
6450 Field: field,
6451 }
6452 ctx = graphql.WithResolverContext(ctx, rctx)
6453 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
6454 return obj.IsDeprecated, nil
6455 })
6456 if resTmp == nil {
6457 if !ec.HasError(rctx) {
6458 ec.Errorf(ctx, "must not be null")
6459 }
6460 return graphql.Null
6461 }
6462 res := resTmp.(bool)
6463 rctx.Result = res
6464 return graphql.MarshalBoolean(res)
6465}
6466
6467// nolint: vetshadow
6468func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler {
6469 rctx := &graphql.ResolverContext{
6470 Object: "__EnumValue",
6471 Args: nil,
6472 Field: field,
6473 }
6474 ctx = graphql.WithResolverContext(ctx, rctx)
6475 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
6476 return obj.DeprecationReason, nil
6477 })
6478 if resTmp == nil {
6479 return graphql.Null
6480 }
6481 res := resTmp.(string)
6482 rctx.Result = res
6483 return graphql.MarshalString(res)
6484}
6485
6486var __FieldImplementors = []string{"__Field"}
6487
6488// nolint: gocyclo, errcheck, gas, goconst
6489func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler {
6490 fields := graphql.CollectFields(ctx, sel, __FieldImplementors)
6491
6492 out := graphql.NewOrderedMap(len(fields))
6493 invalid := false
6494 for i, field := range fields {
6495 out.Keys[i] = field.Alias
6496
6497 switch field.Name {
6498 case "__typename":
6499 out.Values[i] = graphql.MarshalString("__Field")
6500 case "name":
6501 out.Values[i] = ec.___Field_name(ctx, field, obj)
6502 if out.Values[i] == graphql.Null {
6503 invalid = true
6504 }
6505 case "description":
6506 out.Values[i] = ec.___Field_description(ctx, field, obj)
6507 case "args":
6508 out.Values[i] = ec.___Field_args(ctx, field, obj)
6509 if out.Values[i] == graphql.Null {
6510 invalid = true
6511 }
6512 case "type":
6513 out.Values[i] = ec.___Field_type(ctx, field, obj)
6514 if out.Values[i] == graphql.Null {
6515 invalid = true
6516 }
6517 case "isDeprecated":
6518 out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj)
6519 if out.Values[i] == graphql.Null {
6520 invalid = true
6521 }
6522 case "deprecationReason":
6523 out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj)
6524 default:
6525 panic("unknown field " + strconv.Quote(field.Name))
6526 }
6527 }
6528
6529 if invalid {
6530 return graphql.Null
6531 }
6532 return out
6533}
6534
6535// nolint: vetshadow
6536func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {
6537 rctx := &graphql.ResolverContext{
6538 Object: "__Field",
6539 Args: nil,
6540 Field: field,
6541 }
6542 ctx = graphql.WithResolverContext(ctx, rctx)
6543 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
6544 return obj.Name, nil
6545 })
6546 if resTmp == nil {
6547 if !ec.HasError(rctx) {
6548 ec.Errorf(ctx, "must not be null")
6549 }
6550 return graphql.Null
6551 }
6552 res := resTmp.(string)
6553 rctx.Result = res
6554 return graphql.MarshalString(res)
6555}
6556
6557// nolint: vetshadow
6558func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {
6559 rctx := &graphql.ResolverContext{
6560 Object: "__Field",
6561 Args: nil,
6562 Field: field,
6563 }
6564 ctx = graphql.WithResolverContext(ctx, rctx)
6565 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
6566 return obj.Description, nil
6567 })
6568 if resTmp == nil {
6569 return graphql.Null
6570 }
6571 res := resTmp.(string)
6572 rctx.Result = res
6573 return graphql.MarshalString(res)
6574}
6575
6576// nolint: vetshadow
6577func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {
6578 rctx := &graphql.ResolverContext{
6579 Object: "__Field",
6580 Args: nil,
6581 Field: field,
6582 }
6583 ctx = graphql.WithResolverContext(ctx, rctx)
6584 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
6585 return obj.Args, nil
6586 })
6587 if resTmp == nil {
6588 if !ec.HasError(rctx) {
6589 ec.Errorf(ctx, "must not be null")
6590 }
6591 return graphql.Null
6592 }
6593 res := resTmp.([]introspection.InputValue)
6594 rctx.Result = res
6595
6596 arr1 := make(graphql.Array, len(res))
6597 var wg sync.WaitGroup
6598
6599 isLen1 := len(res) == 1
6600 if !isLen1 {
6601 wg.Add(len(res))
6602 }
6603
6604 for idx1 := range res {
6605 idx1 := idx1
6606 rctx := &graphql.ResolverContext{
6607 Index: &idx1,
6608 Result: &res[idx1],
6609 }
6610 ctx := graphql.WithResolverContext(ctx, rctx)
6611 f := func(idx1 int) {
6612 if !isLen1 {
6613 defer wg.Done()
6614 }
6615 arr1[idx1] = func() graphql.Marshaler {
6616
6617 return ec.___InputValue(ctx, field.Selections, &res[idx1])
6618 }()
6619 }
6620 if isLen1 {
6621 f(idx1)
6622 } else {
6623 go f(idx1)
6624 }
6625
6626 }
6627 wg.Wait()
6628 return arr1
6629}
6630
6631// nolint: vetshadow
6632func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {
6633 rctx := &graphql.ResolverContext{
6634 Object: "__Field",
6635 Args: nil,
6636 Field: field,
6637 }
6638 ctx = graphql.WithResolverContext(ctx, rctx)
6639 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
6640 return obj.Type, nil
6641 })
6642 if resTmp == nil {
6643 if !ec.HasError(rctx) {
6644 ec.Errorf(ctx, "must not be null")
6645 }
6646 return graphql.Null
6647 }
6648 res := resTmp.(*introspection.Type)
6649 rctx.Result = res
6650
6651 if res == nil {
6652 if !ec.HasError(rctx) {
6653 ec.Errorf(ctx, "must not be null")
6654 }
6655 return graphql.Null
6656 }
6657
6658 return ec.___Type(ctx, field.Selections, res)
6659}
6660
6661// nolint: vetshadow
6662func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {
6663 rctx := &graphql.ResolverContext{
6664 Object: "__Field",
6665 Args: nil,
6666 Field: field,
6667 }
6668 ctx = graphql.WithResolverContext(ctx, rctx)
6669 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
6670 return obj.IsDeprecated, nil
6671 })
6672 if resTmp == nil {
6673 if !ec.HasError(rctx) {
6674 ec.Errorf(ctx, "must not be null")
6675 }
6676 return graphql.Null
6677 }
6678 res := resTmp.(bool)
6679 rctx.Result = res
6680 return graphql.MarshalBoolean(res)
6681}
6682
6683// nolint: vetshadow
6684func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {
6685 rctx := &graphql.ResolverContext{
6686 Object: "__Field",
6687 Args: nil,
6688 Field: field,
6689 }
6690 ctx = graphql.WithResolverContext(ctx, rctx)
6691 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
6692 return obj.DeprecationReason, nil
6693 })
6694 if resTmp == nil {
6695 return graphql.Null
6696 }
6697 res := resTmp.(string)
6698 rctx.Result = res
6699 return graphql.MarshalString(res)
6700}
6701
6702var __InputValueImplementors = []string{"__InputValue"}
6703
6704// nolint: gocyclo, errcheck, gas, goconst
6705func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler {
6706 fields := graphql.CollectFields(ctx, sel, __InputValueImplementors)
6707
6708 out := graphql.NewOrderedMap(len(fields))
6709 invalid := false
6710 for i, field := range fields {
6711 out.Keys[i] = field.Alias
6712
6713 switch field.Name {
6714 case "__typename":
6715 out.Values[i] = graphql.MarshalString("__InputValue")
6716 case "name":
6717 out.Values[i] = ec.___InputValue_name(ctx, field, obj)
6718 if out.Values[i] == graphql.Null {
6719 invalid = true
6720 }
6721 case "description":
6722 out.Values[i] = ec.___InputValue_description(ctx, field, obj)
6723 case "type":
6724 out.Values[i] = ec.___InputValue_type(ctx, field, obj)
6725 if out.Values[i] == graphql.Null {
6726 invalid = true
6727 }
6728 case "defaultValue":
6729 out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj)
6730 default:
6731 panic("unknown field " + strconv.Quote(field.Name))
6732 }
6733 }
6734
6735 if invalid {
6736 return graphql.Null
6737 }
6738 return out
6739}
6740
6741// nolint: vetshadow
6742func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler {
6743 rctx := &graphql.ResolverContext{
6744 Object: "__InputValue",
6745 Args: nil,
6746 Field: field,
6747 }
6748 ctx = graphql.WithResolverContext(ctx, rctx)
6749 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
6750 return obj.Name, nil
6751 })
6752 if resTmp == nil {
6753 if !ec.HasError(rctx) {
6754 ec.Errorf(ctx, "must not be null")
6755 }
6756 return graphql.Null
6757 }
6758 res := resTmp.(string)
6759 rctx.Result = res
6760 return graphql.MarshalString(res)
6761}
6762
6763// nolint: vetshadow
6764func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler {
6765 rctx := &graphql.ResolverContext{
6766 Object: "__InputValue",
6767 Args: nil,
6768 Field: field,
6769 }
6770 ctx = graphql.WithResolverContext(ctx, rctx)
6771 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
6772 return obj.Description, nil
6773 })
6774 if resTmp == nil {
6775 return graphql.Null
6776 }
6777 res := resTmp.(string)
6778 rctx.Result = res
6779 return graphql.MarshalString(res)
6780}
6781
6782// nolint: vetshadow
6783func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler {
6784 rctx := &graphql.ResolverContext{
6785 Object: "__InputValue",
6786 Args: nil,
6787 Field: field,
6788 }
6789 ctx = graphql.WithResolverContext(ctx, rctx)
6790 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
6791 return obj.Type, nil
6792 })
6793 if resTmp == nil {
6794 if !ec.HasError(rctx) {
6795 ec.Errorf(ctx, "must not be null")
6796 }
6797 return graphql.Null
6798 }
6799 res := resTmp.(*introspection.Type)
6800 rctx.Result = res
6801
6802 if res == nil {
6803 if !ec.HasError(rctx) {
6804 ec.Errorf(ctx, "must not be null")
6805 }
6806 return graphql.Null
6807 }
6808
6809 return ec.___Type(ctx, field.Selections, res)
6810}
6811
6812// nolint: vetshadow
6813func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler {
6814 rctx := &graphql.ResolverContext{
6815 Object: "__InputValue",
6816 Args: nil,
6817 Field: field,
6818 }
6819 ctx = graphql.WithResolverContext(ctx, rctx)
6820 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
6821 return obj.DefaultValue, nil
6822 })
6823 if resTmp == nil {
6824 return graphql.Null
6825 }
6826 res := resTmp.(*string)
6827 rctx.Result = res
6828
6829 if res == nil {
6830 return graphql.Null
6831 }
6832 return graphql.MarshalString(*res)
6833}
6834
6835var __SchemaImplementors = []string{"__Schema"}
6836
6837// nolint: gocyclo, errcheck, gas, goconst
6838func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler {
6839 fields := graphql.CollectFields(ctx, sel, __SchemaImplementors)
6840
6841 out := graphql.NewOrderedMap(len(fields))
6842 invalid := false
6843 for i, field := range fields {
6844 out.Keys[i] = field.Alias
6845
6846 switch field.Name {
6847 case "__typename":
6848 out.Values[i] = graphql.MarshalString("__Schema")
6849 case "types":
6850 out.Values[i] = ec.___Schema_types(ctx, field, obj)
6851 if out.Values[i] == graphql.Null {
6852 invalid = true
6853 }
6854 case "queryType":
6855 out.Values[i] = ec.___Schema_queryType(ctx, field, obj)
6856 if out.Values[i] == graphql.Null {
6857 invalid = true
6858 }
6859 case "mutationType":
6860 out.Values[i] = ec.___Schema_mutationType(ctx, field, obj)
6861 case "subscriptionType":
6862 out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj)
6863 case "directives":
6864 out.Values[i] = ec.___Schema_directives(ctx, field, obj)
6865 if out.Values[i] == graphql.Null {
6866 invalid = true
6867 }
6868 default:
6869 panic("unknown field " + strconv.Quote(field.Name))
6870 }
6871 }
6872
6873 if invalid {
6874 return graphql.Null
6875 }
6876 return out
6877}
6878
6879// nolint: vetshadow
6880func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {
6881 rctx := &graphql.ResolverContext{
6882 Object: "__Schema",
6883 Args: nil,
6884 Field: field,
6885 }
6886 ctx = graphql.WithResolverContext(ctx, rctx)
6887 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
6888 return obj.Types(), nil
6889 })
6890 if resTmp == nil {
6891 if !ec.HasError(rctx) {
6892 ec.Errorf(ctx, "must not be null")
6893 }
6894 return graphql.Null
6895 }
6896 res := resTmp.([]introspection.Type)
6897 rctx.Result = res
6898
6899 arr1 := make(graphql.Array, len(res))
6900 var wg sync.WaitGroup
6901
6902 isLen1 := len(res) == 1
6903 if !isLen1 {
6904 wg.Add(len(res))
6905 }
6906
6907 for idx1 := range res {
6908 idx1 := idx1
6909 rctx := &graphql.ResolverContext{
6910 Index: &idx1,
6911 Result: &res[idx1],
6912 }
6913 ctx := graphql.WithResolverContext(ctx, rctx)
6914 f := func(idx1 int) {
6915 if !isLen1 {
6916 defer wg.Done()
6917 }
6918 arr1[idx1] = func() graphql.Marshaler {
6919
6920 return ec.___Type(ctx, field.Selections, &res[idx1])
6921 }()
6922 }
6923 if isLen1 {
6924 f(idx1)
6925 } else {
6926 go f(idx1)
6927 }
6928
6929 }
6930 wg.Wait()
6931 return arr1
6932}
6933
6934// nolint: vetshadow
6935func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {
6936 rctx := &graphql.ResolverContext{
6937 Object: "__Schema",
6938 Args: nil,
6939 Field: field,
6940 }
6941 ctx = graphql.WithResolverContext(ctx, rctx)
6942 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
6943 return obj.QueryType(), nil
6944 })
6945 if resTmp == nil {
6946 if !ec.HasError(rctx) {
6947 ec.Errorf(ctx, "must not be null")
6948 }
6949 return graphql.Null
6950 }
6951 res := resTmp.(*introspection.Type)
6952 rctx.Result = res
6953
6954 if res == nil {
6955 if !ec.HasError(rctx) {
6956 ec.Errorf(ctx, "must not be null")
6957 }
6958 return graphql.Null
6959 }
6960
6961 return ec.___Type(ctx, field.Selections, res)
6962}
6963
6964// nolint: vetshadow
6965func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {
6966 rctx := &graphql.ResolverContext{
6967 Object: "__Schema",
6968 Args: nil,
6969 Field: field,
6970 }
6971 ctx = graphql.WithResolverContext(ctx, rctx)
6972 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
6973 return obj.MutationType(), nil
6974 })
6975 if resTmp == nil {
6976 return graphql.Null
6977 }
6978 res := resTmp.(*introspection.Type)
6979 rctx.Result = res
6980
6981 if res == nil {
6982 return graphql.Null
6983 }
6984
6985 return ec.___Type(ctx, field.Selections, res)
6986}
6987
6988// nolint: vetshadow
6989func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {
6990 rctx := &graphql.ResolverContext{
6991 Object: "__Schema",
6992 Args: nil,
6993 Field: field,
6994 }
6995 ctx = graphql.WithResolverContext(ctx, rctx)
6996 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
6997 return obj.SubscriptionType(), nil
6998 })
6999 if resTmp == nil {
7000 return graphql.Null
7001 }
7002 res := resTmp.(*introspection.Type)
7003 rctx.Result = res
7004
7005 if res == nil {
7006 return graphql.Null
7007 }
7008
7009 return ec.___Type(ctx, field.Selections, res)
7010}
7011
7012// nolint: vetshadow
7013func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {
7014 rctx := &graphql.ResolverContext{
7015 Object: "__Schema",
7016 Args: nil,
7017 Field: field,
7018 }
7019 ctx = graphql.WithResolverContext(ctx, rctx)
7020 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
7021 return obj.Directives(), nil
7022 })
7023 if resTmp == nil {
7024 if !ec.HasError(rctx) {
7025 ec.Errorf(ctx, "must not be null")
7026 }
7027 return graphql.Null
7028 }
7029 res := resTmp.([]introspection.Directive)
7030 rctx.Result = res
7031
7032 arr1 := make(graphql.Array, len(res))
7033 var wg sync.WaitGroup
7034
7035 isLen1 := len(res) == 1
7036 if !isLen1 {
7037 wg.Add(len(res))
7038 }
7039
7040 for idx1 := range res {
7041 idx1 := idx1
7042 rctx := &graphql.ResolverContext{
7043 Index: &idx1,
7044 Result: &res[idx1],
7045 }
7046 ctx := graphql.WithResolverContext(ctx, rctx)
7047 f := func(idx1 int) {
7048 if !isLen1 {
7049 defer wg.Done()
7050 }
7051 arr1[idx1] = func() graphql.Marshaler {
7052
7053 return ec.___Directive(ctx, field.Selections, &res[idx1])
7054 }()
7055 }
7056 if isLen1 {
7057 f(idx1)
7058 } else {
7059 go f(idx1)
7060 }
7061
7062 }
7063 wg.Wait()
7064 return arr1
7065}
7066
7067var __TypeImplementors = []string{"__Type"}
7068
7069// nolint: gocyclo, errcheck, gas, goconst
7070func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler {
7071 fields := graphql.CollectFields(ctx, sel, __TypeImplementors)
7072
7073 out := graphql.NewOrderedMap(len(fields))
7074 invalid := false
7075 for i, field := range fields {
7076 out.Keys[i] = field.Alias
7077
7078 switch field.Name {
7079 case "__typename":
7080 out.Values[i] = graphql.MarshalString("__Type")
7081 case "kind":
7082 out.Values[i] = ec.___Type_kind(ctx, field, obj)
7083 if out.Values[i] == graphql.Null {
7084 invalid = true
7085 }
7086 case "name":
7087 out.Values[i] = ec.___Type_name(ctx, field, obj)
7088 case "description":
7089 out.Values[i] = ec.___Type_description(ctx, field, obj)
7090 case "fields":
7091 out.Values[i] = ec.___Type_fields(ctx, field, obj)
7092 case "interfaces":
7093 out.Values[i] = ec.___Type_interfaces(ctx, field, obj)
7094 case "possibleTypes":
7095 out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj)
7096 case "enumValues":
7097 out.Values[i] = ec.___Type_enumValues(ctx, field, obj)
7098 case "inputFields":
7099 out.Values[i] = ec.___Type_inputFields(ctx, field, obj)
7100 case "ofType":
7101 out.Values[i] = ec.___Type_ofType(ctx, field, obj)
7102 default:
7103 panic("unknown field " + strconv.Quote(field.Name))
7104 }
7105 }
7106
7107 if invalid {
7108 return graphql.Null
7109 }
7110 return out
7111}
7112
7113// nolint: vetshadow
7114func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
7115 rctx := &graphql.ResolverContext{
7116 Object: "__Type",
7117 Args: nil,
7118 Field: field,
7119 }
7120 ctx = graphql.WithResolverContext(ctx, rctx)
7121 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
7122 return obj.Kind(), nil
7123 })
7124 if resTmp == nil {
7125 if !ec.HasError(rctx) {
7126 ec.Errorf(ctx, "must not be null")
7127 }
7128 return graphql.Null
7129 }
7130 res := resTmp.(string)
7131 rctx.Result = res
7132 return graphql.MarshalString(res)
7133}
7134
7135// nolint: vetshadow
7136func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
7137 rctx := &graphql.ResolverContext{
7138 Object: "__Type",
7139 Args: nil,
7140 Field: field,
7141 }
7142 ctx = graphql.WithResolverContext(ctx, rctx)
7143 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
7144 return obj.Name(), nil
7145 })
7146 if resTmp == nil {
7147 return graphql.Null
7148 }
7149 res := resTmp.(*string)
7150 rctx.Result = res
7151
7152 if res == nil {
7153 return graphql.Null
7154 }
7155 return graphql.MarshalString(*res)
7156}
7157
7158// nolint: vetshadow
7159func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
7160 rctx := &graphql.ResolverContext{
7161 Object: "__Type",
7162 Args: nil,
7163 Field: field,
7164 }
7165 ctx = graphql.WithResolverContext(ctx, rctx)
7166 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
7167 return obj.Description(), nil
7168 })
7169 if resTmp == nil {
7170 return graphql.Null
7171 }
7172 res := resTmp.(string)
7173 rctx.Result = res
7174 return graphql.MarshalString(res)
7175}
7176
7177// nolint: vetshadow
7178func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
7179 rawArgs := field.ArgumentMap(ec.Variables)
7180 args, err := field___Type_fields_args(rawArgs)
7181 if err != nil {
7182 ec.Error(ctx, err)
7183 return graphql.Null
7184 }
7185 rctx := &graphql.ResolverContext{
7186 Object: "__Type",
7187 Args: args,
7188 Field: field,
7189 }
7190 ctx = graphql.WithResolverContext(ctx, rctx)
7191 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
7192 return obj.Fields(args["includeDeprecated"].(bool)), nil
7193 })
7194 if resTmp == nil {
7195 return graphql.Null
7196 }
7197 res := resTmp.([]introspection.Field)
7198 rctx.Result = res
7199
7200 arr1 := make(graphql.Array, len(res))
7201 var wg sync.WaitGroup
7202
7203 isLen1 := len(res) == 1
7204 if !isLen1 {
7205 wg.Add(len(res))
7206 }
7207
7208 for idx1 := range res {
7209 idx1 := idx1
7210 rctx := &graphql.ResolverContext{
7211 Index: &idx1,
7212 Result: &res[idx1],
7213 }
7214 ctx := graphql.WithResolverContext(ctx, rctx)
7215 f := func(idx1 int) {
7216 if !isLen1 {
7217 defer wg.Done()
7218 }
7219 arr1[idx1] = func() graphql.Marshaler {
7220
7221 return ec.___Field(ctx, field.Selections, &res[idx1])
7222 }()
7223 }
7224 if isLen1 {
7225 f(idx1)
7226 } else {
7227 go f(idx1)
7228 }
7229
7230 }
7231 wg.Wait()
7232 return arr1
7233}
7234
7235// nolint: vetshadow
7236func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
7237 rctx := &graphql.ResolverContext{
7238 Object: "__Type",
7239 Args: nil,
7240 Field: field,
7241 }
7242 ctx = graphql.WithResolverContext(ctx, rctx)
7243 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
7244 return obj.Interfaces(), nil
7245 })
7246 if resTmp == nil {
7247 return graphql.Null
7248 }
7249 res := resTmp.([]introspection.Type)
7250 rctx.Result = res
7251
7252 arr1 := make(graphql.Array, len(res))
7253 var wg sync.WaitGroup
7254
7255 isLen1 := len(res) == 1
7256 if !isLen1 {
7257 wg.Add(len(res))
7258 }
7259
7260 for idx1 := range res {
7261 idx1 := idx1
7262 rctx := &graphql.ResolverContext{
7263 Index: &idx1,
7264 Result: &res[idx1],
7265 }
7266 ctx := graphql.WithResolverContext(ctx, rctx)
7267 f := func(idx1 int) {
7268 if !isLen1 {
7269 defer wg.Done()
7270 }
7271 arr1[idx1] = func() graphql.Marshaler {
7272
7273 return ec.___Type(ctx, field.Selections, &res[idx1])
7274 }()
7275 }
7276 if isLen1 {
7277 f(idx1)
7278 } else {
7279 go f(idx1)
7280 }
7281
7282 }
7283 wg.Wait()
7284 return arr1
7285}
7286
7287// nolint: vetshadow
7288func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
7289 rctx := &graphql.ResolverContext{
7290 Object: "__Type",
7291 Args: nil,
7292 Field: field,
7293 }
7294 ctx = graphql.WithResolverContext(ctx, rctx)
7295 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
7296 return obj.PossibleTypes(), nil
7297 })
7298 if resTmp == nil {
7299 return graphql.Null
7300 }
7301 res := resTmp.([]introspection.Type)
7302 rctx.Result = res
7303
7304 arr1 := make(graphql.Array, len(res))
7305 var wg sync.WaitGroup
7306
7307 isLen1 := len(res) == 1
7308 if !isLen1 {
7309 wg.Add(len(res))
7310 }
7311
7312 for idx1 := range res {
7313 idx1 := idx1
7314 rctx := &graphql.ResolverContext{
7315 Index: &idx1,
7316 Result: &res[idx1],
7317 }
7318 ctx := graphql.WithResolverContext(ctx, rctx)
7319 f := func(idx1 int) {
7320 if !isLen1 {
7321 defer wg.Done()
7322 }
7323 arr1[idx1] = func() graphql.Marshaler {
7324
7325 return ec.___Type(ctx, field.Selections, &res[idx1])
7326 }()
7327 }
7328 if isLen1 {
7329 f(idx1)
7330 } else {
7331 go f(idx1)
7332 }
7333
7334 }
7335 wg.Wait()
7336 return arr1
7337}
7338
7339// nolint: vetshadow
7340func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
7341 rawArgs := field.ArgumentMap(ec.Variables)
7342 args, err := field___Type_enumValues_args(rawArgs)
7343 if err != nil {
7344 ec.Error(ctx, err)
7345 return graphql.Null
7346 }
7347 rctx := &graphql.ResolverContext{
7348 Object: "__Type",
7349 Args: args,
7350 Field: field,
7351 }
7352 ctx = graphql.WithResolverContext(ctx, rctx)
7353 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
7354 return obj.EnumValues(args["includeDeprecated"].(bool)), nil
7355 })
7356 if resTmp == nil {
7357 return graphql.Null
7358 }
7359 res := resTmp.([]introspection.EnumValue)
7360 rctx.Result = res
7361
7362 arr1 := make(graphql.Array, len(res))
7363 var wg sync.WaitGroup
7364
7365 isLen1 := len(res) == 1
7366 if !isLen1 {
7367 wg.Add(len(res))
7368 }
7369
7370 for idx1 := range res {
7371 idx1 := idx1
7372 rctx := &graphql.ResolverContext{
7373 Index: &idx1,
7374 Result: &res[idx1],
7375 }
7376 ctx := graphql.WithResolverContext(ctx, rctx)
7377 f := func(idx1 int) {
7378 if !isLen1 {
7379 defer wg.Done()
7380 }
7381 arr1[idx1] = func() graphql.Marshaler {
7382
7383 return ec.___EnumValue(ctx, field.Selections, &res[idx1])
7384 }()
7385 }
7386 if isLen1 {
7387 f(idx1)
7388 } else {
7389 go f(idx1)
7390 }
7391
7392 }
7393 wg.Wait()
7394 return arr1
7395}
7396
7397// nolint: vetshadow
7398func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
7399 rctx := &graphql.ResolverContext{
7400 Object: "__Type",
7401 Args: nil,
7402 Field: field,
7403 }
7404 ctx = graphql.WithResolverContext(ctx, rctx)
7405 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
7406 return obj.InputFields(), nil
7407 })
7408 if resTmp == nil {
7409 return graphql.Null
7410 }
7411 res := resTmp.([]introspection.InputValue)
7412 rctx.Result = res
7413
7414 arr1 := make(graphql.Array, len(res))
7415 var wg sync.WaitGroup
7416
7417 isLen1 := len(res) == 1
7418 if !isLen1 {
7419 wg.Add(len(res))
7420 }
7421
7422 for idx1 := range res {
7423 idx1 := idx1
7424 rctx := &graphql.ResolverContext{
7425 Index: &idx1,
7426 Result: &res[idx1],
7427 }
7428 ctx := graphql.WithResolverContext(ctx, rctx)
7429 f := func(idx1 int) {
7430 if !isLen1 {
7431 defer wg.Done()
7432 }
7433 arr1[idx1] = func() graphql.Marshaler {
7434
7435 return ec.___InputValue(ctx, field.Selections, &res[idx1])
7436 }()
7437 }
7438 if isLen1 {
7439 f(idx1)
7440 } else {
7441 go f(idx1)
7442 }
7443
7444 }
7445 wg.Wait()
7446 return arr1
7447}
7448
7449// nolint: vetshadow
7450func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
7451 rctx := &graphql.ResolverContext{
7452 Object: "__Type",
7453 Args: nil,
7454 Field: field,
7455 }
7456 ctx = graphql.WithResolverContext(ctx, rctx)
7457 resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
7458 return obj.OfType(), nil
7459 })
7460 if resTmp == nil {
7461 return graphql.Null
7462 }
7463 res := resTmp.(*introspection.Type)
7464 rctx.Result = res
7465
7466 if res == nil {
7467 return graphql.Null
7468 }
7469
7470 return ec.___Type(ctx, field.Selections, res)
7471}
7472
7473func (ec *executionContext) _Authored(ctx context.Context, sel ast.SelectionSet, obj *models.Authored) graphql.Marshaler {
7474 switch obj := (*obj).(type) {
7475 case nil:
7476 return graphql.Null
7477 case bug.Comment:
7478 return ec._Comment(ctx, sel, &obj)
7479 case *bug.Comment:
7480 return ec._Comment(ctx, sel, obj)
7481 case bug.CreateOperation:
7482 return ec._CreateOperation(ctx, sel, &obj)
7483 case *bug.CreateOperation:
7484 return ec._CreateOperation(ctx, sel, obj)
7485 case bug.SetTitleOperation:
7486 return ec._SetTitleOperation(ctx, sel, &obj)
7487 case *bug.SetTitleOperation:
7488 return ec._SetTitleOperation(ctx, sel, obj)
7489 case bug.AddCommentOperation:
7490 return ec._AddCommentOperation(ctx, sel, &obj)
7491 case *bug.AddCommentOperation:
7492 return ec._AddCommentOperation(ctx, sel, obj)
7493 case bug.SetStatusOperation:
7494 return ec._SetStatusOperation(ctx, sel, &obj)
7495 case *bug.SetStatusOperation:
7496 return ec._SetStatusOperation(ctx, sel, obj)
7497 case bug.LabelChangeOperation:
7498 return ec._LabelChangeOperation(ctx, sel, &obj)
7499 case *bug.LabelChangeOperation:
7500 return ec._LabelChangeOperation(ctx, sel, obj)
7501 default:
7502 panic(fmt.Errorf("unexpected type %T", obj))
7503 }
7504}
7505
7506func (ec *executionContext) _Operation(ctx context.Context, sel ast.SelectionSet, obj *bug.Operation) graphql.Marshaler {
7507 switch obj := (*obj).(type) {
7508 case nil:
7509 return graphql.Null
7510 case *bug.CreateOperation:
7511 return ec._CreateOperation(ctx, sel, obj)
7512 case *bug.SetTitleOperation:
7513 return ec._SetTitleOperation(ctx, sel, obj)
7514 case *bug.AddCommentOperation:
7515 return ec._AddCommentOperation(ctx, sel, obj)
7516 case *bug.SetStatusOperation:
7517 return ec._SetStatusOperation(ctx, sel, obj)
7518 case *bug.LabelChangeOperation:
7519 return ec._LabelChangeOperation(ctx, sel, obj)
7520 default:
7521 panic(fmt.Errorf("unexpected type %T", obj))
7522 }
7523}
7524
7525func (ec *executionContext) _TimelineItem(ctx context.Context, sel ast.SelectionSet, obj *bug.TimelineItem) graphql.Marshaler {
7526 switch obj := (*obj).(type) {
7527 case nil:
7528 return graphql.Null
7529 case *bug.CreateTimelineItem:
7530 return ec._CreateTimelineItem(ctx, sel, obj)
7531 case *bug.AddCommentTimelineItem:
7532 return ec._AddCommentTimelineItem(ctx, sel, obj)
7533 case bug.LabelChangeTimelineItem:
7534 return ec._LabelChangeTimelineItem(ctx, sel, &obj)
7535 case *bug.LabelChangeTimelineItem:
7536 return ec._LabelChangeTimelineItem(ctx, sel, obj)
7537 case bug.SetStatusTimelineItem:
7538 return ec._SetStatusTimelineItem(ctx, sel, &obj)
7539 case *bug.SetStatusTimelineItem:
7540 return ec._SetStatusTimelineItem(ctx, sel, obj)
7541 case bug.SetTitleTimelineItem:
7542 return ec._SetTitleTimelineItem(ctx, sel, &obj)
7543 case *bug.SetTitleTimelineItem:
7544 return ec._SetTitleTimelineItem(ctx, sel, obj)
7545 default:
7546 panic(fmt.Errorf("unexpected type %T", obj))
7547 }
7548}
7549
7550func (ec *executionContext) FieldMiddleware(ctx context.Context, obj interface{}, next graphql.Resolver) (ret interface{}) {
7551 defer func() {
7552 if r := recover(); r != nil {
7553 ec.Error(ctx, ec.Recover(ctx, r))
7554 ret = nil
7555 }
7556 }()
7557 res, err := ec.ResolverMiddleware(ctx, next)
7558 if err != nil {
7559 ec.Error(ctx, err)
7560 return nil
7561 }
7562 return res
7563}
7564
7565func (ec *executionContext) introspectSchema() *introspection.Schema {
7566 return introspection.WrapSchema(parsedSchema)
7567}
7568
7569func (ec *executionContext) introspectType(name string) *introspection.Type {
7570 return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name])
7571}
7572
7573var parsedSchema = gqlparser.MustLoadSchema(
7574 &ast.Source{Name: "schema.graphql", Input: `scalar Time
7575scalar Label
7576scalar Hash
7577
7578"""Information about pagination in a connection."""
7579type PageInfo {
7580 """When paginating forwards, are there more items?"""
7581 hasNextPage: Boolean!
7582 """When paginating backwards, are there more items?"""
7583 hasPreviousPage: Boolean!
7584 """When paginating backwards, the cursor to continue."""
7585 startCursor: String!
7586 """When paginating forwards, the cursor to continue."""
7587 endCursor: String!
7588}
7589
7590"""Represents an person in a git object."""
7591type Person {
7592 """The email of the person."""
7593 email: String
7594
7595 """The name of the person."""
7596 name: String!
7597
7598 """An url to an avatar"""
7599 avatarUrl: String
7600}
7601
7602type CommentConnection {
7603 edges: [CommentEdge!]!
7604 nodes: [Comment!]!
7605 pageInfo: PageInfo!
7606 totalCount: Int!
7607}
7608
7609type CommentEdge {
7610 cursor: String!
7611 node: Comment!
7612}
7613
7614"""Represents a comment on a bug."""
7615type Comment implements Authored {
7616 """The author of this comment."""
7617 author: Person!
7618
7619 """The message of this comment."""
7620 message: String!
7621
7622 """All media's hash referenced in this comment"""
7623 files: [Hash!]!
7624}
7625
7626enum Status {
7627 OPEN
7628 CLOSED
7629}
7630
7631"""An object that has an author."""
7632interface Authored {
7633 """The author of this object."""
7634 author: Person!
7635}
7636
7637type OperationConnection {
7638 edges: [OperationEdge!]!
7639 nodes: [Operation!]!
7640 pageInfo: PageInfo!
7641 totalCount: Int!
7642}
7643
7644type OperationEdge {
7645 cursor: String!
7646 node: Operation!
7647}
7648
7649"""An item in the timeline of events"""
7650interface TimelineItem {
7651 hash: Hash!
7652}
7653
7654"""An operation applied to a bug."""
7655interface Operation {
7656 """The operations author."""
7657 author: Person!
7658 """The datetime when this operation was issued."""
7659 date: Time!
7660}
7661
7662type CreateOperation implements Operation & Authored {
7663 author: Person!
7664 date: Time!
7665
7666 title: String!
7667 message: String!
7668 files: [Hash!]!
7669}
7670
7671type SetTitleOperation implements Operation & Authored {
7672 hash: Hash!
7673 author: Person!
7674 date: Time!
7675
7676 title: String!
7677 was: String!
7678}
7679
7680type AddCommentOperation implements Operation & Authored {
7681 author: Person!
7682 date: Time!
7683
7684 message: String!
7685 files: [Hash!]!
7686}
7687
7688type SetStatusOperation implements Operation & Authored {
7689 hash: Hash!
7690 author: Person!
7691 date: Time!
7692
7693 status: Status!
7694}
7695
7696type LabelChangeOperation implements Operation & Authored {
7697 hash: Hash!
7698 author: Person!
7699 date: Time!
7700
7701 added: [Label!]!
7702 removed: [Label!]!
7703}
7704
7705type TimelineItemConnection {
7706 edges: [TimelineItemEdge!]!
7707 nodes: [TimelineItem!]!
7708 pageInfo: PageInfo!
7709 totalCount: Int!
7710}
7711
7712type TimelineItemEdge {
7713 cursor: String!
7714 node: TimelineItem!
7715}
7716
7717type CommentHistoryStep {
7718 message: String!
7719 date: Time!
7720}
7721
7722type CreateTimelineItem implements TimelineItem {
7723 hash: Hash!
7724 author: Person!
7725 message: String!
7726 files: [Hash!]!
7727 createdAt: Time!
7728 lastEdit: Time!
7729 edited: Boolean!
7730 history: [CommentHistoryStep!]!
7731}
7732
7733type AddCommentTimelineItem implements TimelineItem {
7734 hash: Hash!
7735 author: Person!
7736 message: String!
7737 files: [Hash!]!
7738 createdAt: Time!
7739 lastEdit: Time!
7740 edited: Boolean!
7741 history: [CommentHistoryStep!]!
7742}
7743
7744type LabelChangeTimelineItem implements TimelineItem {
7745 hash: Hash!
7746 author: Person!
7747 date: Time!
7748 added: [Label!]!
7749 removed: [Label!]!
7750}
7751
7752type SetStatusTimelineItem implements TimelineItem {
7753 hash: Hash!
7754 author: Person!
7755 date: Time!
7756 status: Status!
7757}
7758
7759type SetTitleTimelineItem implements TimelineItem {
7760 hash: Hash!
7761 author: Person!
7762 date: Time!
7763 title: String!
7764 was: String!
7765}
7766
7767"""The connection type for Bug."""
7768type BugConnection {
7769 """A list of edges."""
7770 edges: [BugEdge!]!
7771 nodes: [Bug!]!
7772 """Information to aid in pagination."""
7773 pageInfo: PageInfo!
7774 """Identifies the total count of items in the connection."""
7775 totalCount: Int!
7776}
7777
7778"""An edge in a connection."""
7779type BugEdge {
7780 """A cursor for use in pagination."""
7781 cursor: String!
7782 """The item at the end of the edge."""
7783 node: Bug!
7784}
7785
7786type Bug {
7787 id: String!
7788 humanId: String!
7789 status: Status!
7790 title: String!
7791 labels: [Label!]!
7792 author: Person!
7793 createdAt: Time!
7794 lastEdit: Time!
7795
7796 comments(
7797 """Returns the elements in the list that come after the specified cursor."""
7798 after: String
7799 """Returns the elements in the list that come before the specified cursor."""
7800 before: String
7801 """Returns the first _n_ elements from the list."""
7802 first: Int
7803 """Returns the last _n_ elements from the list."""
7804 last: Int
7805 ): CommentConnection!
7806
7807 timeline(
7808 """Returns the elements in the list that come after the specified cursor."""
7809 after: String
7810 """Returns the elements in the list that come before the specified cursor."""
7811 before: String
7812 """Returns the first _n_ elements from the list."""
7813 first: Int
7814 """Returns the last _n_ elements from the list."""
7815 last: Int
7816 ): TimelineItemConnection!
7817
7818 operations(
7819 """Returns the elements in the list that come after the specified cursor."""
7820 after: String
7821 """Returns the elements in the list that come before the specified cursor."""
7822 before: String
7823 """Returns the first _n_ elements from the list."""
7824 first: Int
7825 """Returns the last _n_ elements from the list."""
7826 last: Int
7827 ): OperationConnection!
7828}
7829
7830type Repository {
7831 allBugs(
7832 """Returns the elements in the list that come after the specified cursor."""
7833 after: String
7834 """Returns the elements in the list that come before the specified cursor."""
7835 before: String
7836 """Returns the first _n_ elements from the list."""
7837 first: Int
7838 """Returns the last _n_ elements from the list."""
7839 last: Int
7840 """A query to select and order bugs"""
7841 query: String
7842 ): BugConnection!
7843 bug(prefix: String!): Bug
7844}
7845
7846type Query {
7847 defaultRepository: Repository
7848 repository(id: String!): Repository
7849}
7850
7851type Mutation {
7852 newBug(repoRef: String, title: String!, message: String!, files: [Hash!]): Bug!
7853
7854 addComment(repoRef: String, prefix: String!, message: String!, files: [Hash!]): Bug!
7855 changeLabels(repoRef: String, prefix: String!, added: [String!], removed: [String!]): Bug!
7856 open(repoRef: String, prefix: String!): Bug!
7857 close(repoRef: String, prefix: String!): Bug!
7858 setTitle(repoRef: String, prefix: String!, title: String!): Bug!
7859
7860 commit(repoRef: String, prefix: String!): Bug!
7861}
7862`},
7863)