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