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