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