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