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