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