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