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