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