1// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
2
3package graph
4
5import (
6 "context"
7 "errors"
8 "fmt"
9 "strconv"
10 "sync"
11 "sync/atomic"
12 "time"
13
14 "github.com/99designs/gqlgen/graphql"
15 "github.com/MichaelMure/git-bug/api/graphql/models"
16 "github.com/MichaelMure/git-bug/entities/bug"
17 "github.com/MichaelMure/git-bug/entities/common"
18 "github.com/MichaelMure/git-bug/repository"
19 "github.com/vektah/gqlparser/v2/ast"
20)
21
22// region ************************** generated!.gotpl **************************
23
24type BugResolver interface {
25 ID(ctx context.Context, obj models.BugWrapper) (string, error)
26 HumanID(ctx context.Context, obj models.BugWrapper) (string, error)
27
28 Actors(ctx context.Context, obj models.BugWrapper, after *string, before *string, first *int, last *int) (*models.IdentityConnection, error)
29 Participants(ctx context.Context, obj models.BugWrapper, after *string, before *string, first *int, last *int) (*models.IdentityConnection, error)
30 Comments(ctx context.Context, obj models.BugWrapper, after *string, before *string, first *int, last *int) (*models.CommentConnection, error)
31 Timeline(ctx context.Context, obj models.BugWrapper, after *string, before *string, first *int, last *int) (*models.TimelineItemConnection, error)
32 Operations(ctx context.Context, obj models.BugWrapper, after *string, before *string, first *int, last *int) (*models.OperationConnection, error)
33}
34type CommentResolver interface {
35 Author(ctx context.Context, obj *bug.Comment) (models.IdentityWrapper, error)
36}
37
38// endregion ************************** generated!.gotpl **************************
39
40// region ***************************** args.gotpl *****************************
41
42func (ec *executionContext) field_Bug_actors_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
43 var err error
44 args := map[string]interface{}{}
45 var arg0 *string
46 if tmp, ok := rawArgs["after"]; ok {
47 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("after"))
48 arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
49 if err != nil {
50 return nil, err
51 }
52 }
53 args["after"] = arg0
54 var arg1 *string
55 if tmp, ok := rawArgs["before"]; ok {
56 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("before"))
57 arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
58 if err != nil {
59 return nil, err
60 }
61 }
62 args["before"] = arg1
63 var arg2 *int
64 if tmp, ok := rawArgs["first"]; ok {
65 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("first"))
66 arg2, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
67 if err != nil {
68 return nil, err
69 }
70 }
71 args["first"] = arg2
72 var arg3 *int
73 if tmp, ok := rawArgs["last"]; ok {
74 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("last"))
75 arg3, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
76 if err != nil {
77 return nil, err
78 }
79 }
80 args["last"] = arg3
81 return args, nil
82}
83
84func (ec *executionContext) field_Bug_comments_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
85 var err error
86 args := map[string]interface{}{}
87 var arg0 *string
88 if tmp, ok := rawArgs["after"]; ok {
89 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("after"))
90 arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
91 if err != nil {
92 return nil, err
93 }
94 }
95 args["after"] = arg0
96 var arg1 *string
97 if tmp, ok := rawArgs["before"]; ok {
98 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("before"))
99 arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
100 if err != nil {
101 return nil, err
102 }
103 }
104 args["before"] = arg1
105 var arg2 *int
106 if tmp, ok := rawArgs["first"]; ok {
107 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("first"))
108 arg2, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
109 if err != nil {
110 return nil, err
111 }
112 }
113 args["first"] = arg2
114 var arg3 *int
115 if tmp, ok := rawArgs["last"]; ok {
116 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("last"))
117 arg3, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
118 if err != nil {
119 return nil, err
120 }
121 }
122 args["last"] = arg3
123 return args, nil
124}
125
126func (ec *executionContext) field_Bug_operations_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
127 var err error
128 args := map[string]interface{}{}
129 var arg0 *string
130 if tmp, ok := rawArgs["after"]; ok {
131 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("after"))
132 arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
133 if err != nil {
134 return nil, err
135 }
136 }
137 args["after"] = arg0
138 var arg1 *string
139 if tmp, ok := rawArgs["before"]; ok {
140 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("before"))
141 arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
142 if err != nil {
143 return nil, err
144 }
145 }
146 args["before"] = arg1
147 var arg2 *int
148 if tmp, ok := rawArgs["first"]; ok {
149 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("first"))
150 arg2, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
151 if err != nil {
152 return nil, err
153 }
154 }
155 args["first"] = arg2
156 var arg3 *int
157 if tmp, ok := rawArgs["last"]; ok {
158 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("last"))
159 arg3, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
160 if err != nil {
161 return nil, err
162 }
163 }
164 args["last"] = arg3
165 return args, nil
166}
167
168func (ec *executionContext) field_Bug_participants_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
169 var err error
170 args := map[string]interface{}{}
171 var arg0 *string
172 if tmp, ok := rawArgs["after"]; ok {
173 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("after"))
174 arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
175 if err != nil {
176 return nil, err
177 }
178 }
179 args["after"] = arg0
180 var arg1 *string
181 if tmp, ok := rawArgs["before"]; ok {
182 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("before"))
183 arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
184 if err != nil {
185 return nil, err
186 }
187 }
188 args["before"] = arg1
189 var arg2 *int
190 if tmp, ok := rawArgs["first"]; ok {
191 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("first"))
192 arg2, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
193 if err != nil {
194 return nil, err
195 }
196 }
197 args["first"] = arg2
198 var arg3 *int
199 if tmp, ok := rawArgs["last"]; ok {
200 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("last"))
201 arg3, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
202 if err != nil {
203 return nil, err
204 }
205 }
206 args["last"] = arg3
207 return args, nil
208}
209
210func (ec *executionContext) field_Bug_timeline_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
211 var err error
212 args := map[string]interface{}{}
213 var arg0 *string
214 if tmp, ok := rawArgs["after"]; ok {
215 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("after"))
216 arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
217 if err != nil {
218 return nil, err
219 }
220 }
221 args["after"] = arg0
222 var arg1 *string
223 if tmp, ok := rawArgs["before"]; ok {
224 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("before"))
225 arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
226 if err != nil {
227 return nil, err
228 }
229 }
230 args["before"] = arg1
231 var arg2 *int
232 if tmp, ok := rawArgs["first"]; ok {
233 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("first"))
234 arg2, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
235 if err != nil {
236 return nil, err
237 }
238 }
239 args["first"] = arg2
240 var arg3 *int
241 if tmp, ok := rawArgs["last"]; ok {
242 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("last"))
243 arg3, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
244 if err != nil {
245 return nil, err
246 }
247 }
248 args["last"] = arg3
249 return args, nil
250}
251
252// endregion ***************************** args.gotpl *****************************
253
254// region ************************** directives.gotpl **************************
255
256// endregion ************************** directives.gotpl **************************
257
258// region **************************** field.gotpl *****************************
259
260func (ec *executionContext) _Bug_id(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
261 fc, err := ec.fieldContext_Bug_id(ctx, field)
262 if err != nil {
263 return graphql.Null
264 }
265 ctx = graphql.WithFieldContext(ctx, fc)
266 defer func() {
267 if r := recover(); r != nil {
268 ec.Error(ctx, ec.Recover(ctx, r))
269 ret = graphql.Null
270 }
271 }()
272 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
273 ctx = rctx // use context from middleware stack in children
274 return ec.resolvers.Bug().ID(rctx, obj)
275 })
276 if err != nil {
277 ec.Error(ctx, err)
278 return graphql.Null
279 }
280 if resTmp == nil {
281 if !graphql.HasFieldError(ctx, fc) {
282 ec.Errorf(ctx, "must not be null")
283 }
284 return graphql.Null
285 }
286 res := resTmp.(string)
287 fc.Result = res
288 return ec.marshalNString2string(ctx, field.Selections, res)
289}
290
291func (ec *executionContext) fieldContext_Bug_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
292 fc = &graphql.FieldContext{
293 Object: "Bug",
294 Field: field,
295 IsMethod: true,
296 IsResolver: true,
297 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
298 return nil, errors.New("field of type String does not have child fields")
299 },
300 }
301 return fc, nil
302}
303
304func (ec *executionContext) _Bug_humanId(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
305 fc, err := ec.fieldContext_Bug_humanId(ctx, field)
306 if err != nil {
307 return graphql.Null
308 }
309 ctx = graphql.WithFieldContext(ctx, fc)
310 defer func() {
311 if r := recover(); r != nil {
312 ec.Error(ctx, ec.Recover(ctx, r))
313 ret = graphql.Null
314 }
315 }()
316 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
317 ctx = rctx // use context from middleware stack in children
318 return ec.resolvers.Bug().HumanID(rctx, obj)
319 })
320 if err != nil {
321 ec.Error(ctx, err)
322 return graphql.Null
323 }
324 if resTmp == nil {
325 if !graphql.HasFieldError(ctx, fc) {
326 ec.Errorf(ctx, "must not be null")
327 }
328 return graphql.Null
329 }
330 res := resTmp.(string)
331 fc.Result = res
332 return ec.marshalNString2string(ctx, field.Selections, res)
333}
334
335func (ec *executionContext) fieldContext_Bug_humanId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
336 fc = &graphql.FieldContext{
337 Object: "Bug",
338 Field: field,
339 IsMethod: true,
340 IsResolver: true,
341 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
342 return nil, errors.New("field of type String does not have child fields")
343 },
344 }
345 return fc, nil
346}
347
348func (ec *executionContext) _Bug_status(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
349 fc, err := ec.fieldContext_Bug_status(ctx, field)
350 if err != nil {
351 return graphql.Null
352 }
353 ctx = graphql.WithFieldContext(ctx, fc)
354 defer func() {
355 if r := recover(); r != nil {
356 ec.Error(ctx, ec.Recover(ctx, r))
357 ret = graphql.Null
358 }
359 }()
360 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
361 ctx = rctx // use context from middleware stack in children
362 return obj.Status(), nil
363 })
364 if err != nil {
365 ec.Error(ctx, err)
366 return graphql.Null
367 }
368 if resTmp == nil {
369 if !graphql.HasFieldError(ctx, fc) {
370 ec.Errorf(ctx, "must not be null")
371 }
372 return graphql.Null
373 }
374 res := resTmp.(common.Status)
375 fc.Result = res
376 return ec.marshalNStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋcommonᚐStatus(ctx, field.Selections, res)
377}
378
379func (ec *executionContext) fieldContext_Bug_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
380 fc = &graphql.FieldContext{
381 Object: "Bug",
382 Field: field,
383 IsMethod: true,
384 IsResolver: false,
385 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
386 return nil, errors.New("field of type Status does not have child fields")
387 },
388 }
389 return fc, nil
390}
391
392func (ec *executionContext) _Bug_title(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
393 fc, err := ec.fieldContext_Bug_title(ctx, field)
394 if err != nil {
395 return graphql.Null
396 }
397 ctx = graphql.WithFieldContext(ctx, fc)
398 defer func() {
399 if r := recover(); r != nil {
400 ec.Error(ctx, ec.Recover(ctx, r))
401 ret = graphql.Null
402 }
403 }()
404 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
405 ctx = rctx // use context from middleware stack in children
406 return obj.Title(), nil
407 })
408 if err != nil {
409 ec.Error(ctx, err)
410 return graphql.Null
411 }
412 if resTmp == nil {
413 if !graphql.HasFieldError(ctx, fc) {
414 ec.Errorf(ctx, "must not be null")
415 }
416 return graphql.Null
417 }
418 res := resTmp.(string)
419 fc.Result = res
420 return ec.marshalNString2string(ctx, field.Selections, res)
421}
422
423func (ec *executionContext) fieldContext_Bug_title(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
424 fc = &graphql.FieldContext{
425 Object: "Bug",
426 Field: field,
427 IsMethod: true,
428 IsResolver: false,
429 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
430 return nil, errors.New("field of type String does not have child fields")
431 },
432 }
433 return fc, nil
434}
435
436func (ec *executionContext) _Bug_labels(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
437 fc, err := ec.fieldContext_Bug_labels(ctx, field)
438 if err != nil {
439 return graphql.Null
440 }
441 ctx = graphql.WithFieldContext(ctx, fc)
442 defer func() {
443 if r := recover(); r != nil {
444 ec.Error(ctx, ec.Recover(ctx, r))
445 ret = graphql.Null
446 }
447 }()
448 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
449 ctx = rctx // use context from middleware stack in children
450 return obj.Labels(), nil
451 })
452 if err != nil {
453 ec.Error(ctx, err)
454 return graphql.Null
455 }
456 if resTmp == nil {
457 if !graphql.HasFieldError(ctx, fc) {
458 ec.Errorf(ctx, "must not be null")
459 }
460 return graphql.Null
461 }
462 res := resTmp.([]bug.Label)
463 fc.Result = res
464 return ec.marshalNLabel2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐLabelᚄ(ctx, field.Selections, res)
465}
466
467func (ec *executionContext) fieldContext_Bug_labels(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
468 fc = &graphql.FieldContext{
469 Object: "Bug",
470 Field: field,
471 IsMethod: true,
472 IsResolver: false,
473 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
474 switch field.Name {
475 case "name":
476 return ec.fieldContext_Label_name(ctx, field)
477 case "color":
478 return ec.fieldContext_Label_color(ctx, field)
479 }
480 return nil, fmt.Errorf("no field named %q was found under type Label", field.Name)
481 },
482 }
483 return fc, nil
484}
485
486func (ec *executionContext) _Bug_author(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
487 fc, err := ec.fieldContext_Bug_author(ctx, field)
488 if err != nil {
489 return graphql.Null
490 }
491 ctx = graphql.WithFieldContext(ctx, fc)
492 defer func() {
493 if r := recover(); r != nil {
494 ec.Error(ctx, ec.Recover(ctx, r))
495 ret = graphql.Null
496 }
497 }()
498 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
499 ctx = rctx // use context from middleware stack in children
500 return obj.Author()
501 })
502 if err != nil {
503 ec.Error(ctx, err)
504 return graphql.Null
505 }
506 if resTmp == nil {
507 if !graphql.HasFieldError(ctx, fc) {
508 ec.Errorf(ctx, "must not be null")
509 }
510 return graphql.Null
511 }
512 res := resTmp.(models.IdentityWrapper)
513 fc.Result = res
514 return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
515}
516
517func (ec *executionContext) fieldContext_Bug_author(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
518 fc = &graphql.FieldContext{
519 Object: "Bug",
520 Field: field,
521 IsMethod: true,
522 IsResolver: false,
523 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
524 switch field.Name {
525 case "id":
526 return ec.fieldContext_Identity_id(ctx, field)
527 case "humanId":
528 return ec.fieldContext_Identity_humanId(ctx, field)
529 case "name":
530 return ec.fieldContext_Identity_name(ctx, field)
531 case "email":
532 return ec.fieldContext_Identity_email(ctx, field)
533 case "login":
534 return ec.fieldContext_Identity_login(ctx, field)
535 case "displayName":
536 return ec.fieldContext_Identity_displayName(ctx, field)
537 case "avatarUrl":
538 return ec.fieldContext_Identity_avatarUrl(ctx, field)
539 case "isProtected":
540 return ec.fieldContext_Identity_isProtected(ctx, field)
541 }
542 return nil, fmt.Errorf("no field named %q was found under type Identity", field.Name)
543 },
544 }
545 return fc, nil
546}
547
548func (ec *executionContext) _Bug_createdAt(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
549 fc, err := ec.fieldContext_Bug_createdAt(ctx, field)
550 if err != nil {
551 return graphql.Null
552 }
553 ctx = graphql.WithFieldContext(ctx, fc)
554 defer func() {
555 if r := recover(); r != nil {
556 ec.Error(ctx, ec.Recover(ctx, r))
557 ret = graphql.Null
558 }
559 }()
560 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
561 ctx = rctx // use context from middleware stack in children
562 return obj.CreatedAt(), nil
563 })
564 if err != nil {
565 ec.Error(ctx, err)
566 return graphql.Null
567 }
568 if resTmp == nil {
569 if !graphql.HasFieldError(ctx, fc) {
570 ec.Errorf(ctx, "must not be null")
571 }
572 return graphql.Null
573 }
574 res := resTmp.(time.Time)
575 fc.Result = res
576 return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
577}
578
579func (ec *executionContext) fieldContext_Bug_createdAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
580 fc = &graphql.FieldContext{
581 Object: "Bug",
582 Field: field,
583 IsMethod: true,
584 IsResolver: false,
585 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
586 return nil, errors.New("field of type Time does not have child fields")
587 },
588 }
589 return fc, nil
590}
591
592func (ec *executionContext) _Bug_lastEdit(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
593 fc, err := ec.fieldContext_Bug_lastEdit(ctx, field)
594 if err != nil {
595 return graphql.Null
596 }
597 ctx = graphql.WithFieldContext(ctx, fc)
598 defer func() {
599 if r := recover(); r != nil {
600 ec.Error(ctx, ec.Recover(ctx, r))
601 ret = graphql.Null
602 }
603 }()
604 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
605 ctx = rctx // use context from middleware stack in children
606 return obj.LastEdit(), nil
607 })
608 if err != nil {
609 ec.Error(ctx, err)
610 return graphql.Null
611 }
612 if resTmp == nil {
613 if !graphql.HasFieldError(ctx, fc) {
614 ec.Errorf(ctx, "must not be null")
615 }
616 return graphql.Null
617 }
618 res := resTmp.(time.Time)
619 fc.Result = res
620 return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
621}
622
623func (ec *executionContext) fieldContext_Bug_lastEdit(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
624 fc = &graphql.FieldContext{
625 Object: "Bug",
626 Field: field,
627 IsMethod: true,
628 IsResolver: false,
629 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
630 return nil, errors.New("field of type Time does not have child fields")
631 },
632 }
633 return fc, nil
634}
635
636func (ec *executionContext) _Bug_actors(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
637 fc, err := ec.fieldContext_Bug_actors(ctx, field)
638 if err != nil {
639 return graphql.Null
640 }
641 ctx = graphql.WithFieldContext(ctx, fc)
642 defer func() {
643 if r := recover(); r != nil {
644 ec.Error(ctx, ec.Recover(ctx, r))
645 ret = graphql.Null
646 }
647 }()
648 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
649 ctx = rctx // use context from middleware stack in children
650 return ec.resolvers.Bug().Actors(rctx, obj, fc.Args["after"].(*string), fc.Args["before"].(*string), fc.Args["first"].(*int), fc.Args["last"].(*int))
651 })
652 if err != nil {
653 ec.Error(ctx, err)
654 return graphql.Null
655 }
656 if resTmp == nil {
657 if !graphql.HasFieldError(ctx, fc) {
658 ec.Errorf(ctx, "must not be null")
659 }
660 return graphql.Null
661 }
662 res := resTmp.(*models.IdentityConnection)
663 fc.Result = res
664 return ec.marshalNIdentityConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityConnection(ctx, field.Selections, res)
665}
666
667func (ec *executionContext) fieldContext_Bug_actors(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
668 fc = &graphql.FieldContext{
669 Object: "Bug",
670 Field: field,
671 IsMethod: true,
672 IsResolver: true,
673 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
674 switch field.Name {
675 case "edges":
676 return ec.fieldContext_IdentityConnection_edges(ctx, field)
677 case "nodes":
678 return ec.fieldContext_IdentityConnection_nodes(ctx, field)
679 case "pageInfo":
680 return ec.fieldContext_IdentityConnection_pageInfo(ctx, field)
681 case "totalCount":
682 return ec.fieldContext_IdentityConnection_totalCount(ctx, field)
683 }
684 return nil, fmt.Errorf("no field named %q was found under type IdentityConnection", field.Name)
685 },
686 }
687 defer func() {
688 if r := recover(); r != nil {
689 err = ec.Recover(ctx, r)
690 ec.Error(ctx, err)
691 }
692 }()
693 ctx = graphql.WithFieldContext(ctx, fc)
694 if fc.Args, err = ec.field_Bug_actors_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
695 ec.Error(ctx, err)
696 return
697 }
698 return fc, nil
699}
700
701func (ec *executionContext) _Bug_participants(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
702 fc, err := ec.fieldContext_Bug_participants(ctx, field)
703 if err != nil {
704 return graphql.Null
705 }
706 ctx = graphql.WithFieldContext(ctx, fc)
707 defer func() {
708 if r := recover(); r != nil {
709 ec.Error(ctx, ec.Recover(ctx, r))
710 ret = graphql.Null
711 }
712 }()
713 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
714 ctx = rctx // use context from middleware stack in children
715 return ec.resolvers.Bug().Participants(rctx, obj, fc.Args["after"].(*string), fc.Args["before"].(*string), fc.Args["first"].(*int), fc.Args["last"].(*int))
716 })
717 if err != nil {
718 ec.Error(ctx, err)
719 return graphql.Null
720 }
721 if resTmp == nil {
722 if !graphql.HasFieldError(ctx, fc) {
723 ec.Errorf(ctx, "must not be null")
724 }
725 return graphql.Null
726 }
727 res := resTmp.(*models.IdentityConnection)
728 fc.Result = res
729 return ec.marshalNIdentityConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityConnection(ctx, field.Selections, res)
730}
731
732func (ec *executionContext) fieldContext_Bug_participants(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
733 fc = &graphql.FieldContext{
734 Object: "Bug",
735 Field: field,
736 IsMethod: true,
737 IsResolver: true,
738 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
739 switch field.Name {
740 case "edges":
741 return ec.fieldContext_IdentityConnection_edges(ctx, field)
742 case "nodes":
743 return ec.fieldContext_IdentityConnection_nodes(ctx, field)
744 case "pageInfo":
745 return ec.fieldContext_IdentityConnection_pageInfo(ctx, field)
746 case "totalCount":
747 return ec.fieldContext_IdentityConnection_totalCount(ctx, field)
748 }
749 return nil, fmt.Errorf("no field named %q was found under type IdentityConnection", field.Name)
750 },
751 }
752 defer func() {
753 if r := recover(); r != nil {
754 err = ec.Recover(ctx, r)
755 ec.Error(ctx, err)
756 }
757 }()
758 ctx = graphql.WithFieldContext(ctx, fc)
759 if fc.Args, err = ec.field_Bug_participants_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
760 ec.Error(ctx, err)
761 return
762 }
763 return fc, nil
764}
765
766func (ec *executionContext) _Bug_comments(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
767 fc, err := ec.fieldContext_Bug_comments(ctx, field)
768 if err != nil {
769 return graphql.Null
770 }
771 ctx = graphql.WithFieldContext(ctx, fc)
772 defer func() {
773 if r := recover(); r != nil {
774 ec.Error(ctx, ec.Recover(ctx, r))
775 ret = graphql.Null
776 }
777 }()
778 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
779 ctx = rctx // use context from middleware stack in children
780 return ec.resolvers.Bug().Comments(rctx, obj, fc.Args["after"].(*string), fc.Args["before"].(*string), fc.Args["first"].(*int), fc.Args["last"].(*int))
781 })
782 if err != nil {
783 ec.Error(ctx, err)
784 return graphql.Null
785 }
786 if resTmp == nil {
787 if !graphql.HasFieldError(ctx, fc) {
788 ec.Errorf(ctx, "must not be null")
789 }
790 return graphql.Null
791 }
792 res := resTmp.(*models.CommentConnection)
793 fc.Result = res
794 return ec.marshalNCommentConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCommentConnection(ctx, field.Selections, res)
795}
796
797func (ec *executionContext) fieldContext_Bug_comments(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
798 fc = &graphql.FieldContext{
799 Object: "Bug",
800 Field: field,
801 IsMethod: true,
802 IsResolver: true,
803 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
804 switch field.Name {
805 case "edges":
806 return ec.fieldContext_CommentConnection_edges(ctx, field)
807 case "nodes":
808 return ec.fieldContext_CommentConnection_nodes(ctx, field)
809 case "pageInfo":
810 return ec.fieldContext_CommentConnection_pageInfo(ctx, field)
811 case "totalCount":
812 return ec.fieldContext_CommentConnection_totalCount(ctx, field)
813 }
814 return nil, fmt.Errorf("no field named %q was found under type CommentConnection", field.Name)
815 },
816 }
817 defer func() {
818 if r := recover(); r != nil {
819 err = ec.Recover(ctx, r)
820 ec.Error(ctx, err)
821 }
822 }()
823 ctx = graphql.WithFieldContext(ctx, fc)
824 if fc.Args, err = ec.field_Bug_comments_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
825 ec.Error(ctx, err)
826 return
827 }
828 return fc, nil
829}
830
831func (ec *executionContext) _Bug_timeline(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
832 fc, err := ec.fieldContext_Bug_timeline(ctx, field)
833 if err != nil {
834 return graphql.Null
835 }
836 ctx = graphql.WithFieldContext(ctx, fc)
837 defer func() {
838 if r := recover(); r != nil {
839 ec.Error(ctx, ec.Recover(ctx, r))
840 ret = graphql.Null
841 }
842 }()
843 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
844 ctx = rctx // use context from middleware stack in children
845 return ec.resolvers.Bug().Timeline(rctx, obj, fc.Args["after"].(*string), fc.Args["before"].(*string), fc.Args["first"].(*int), fc.Args["last"].(*int))
846 })
847 if err != nil {
848 ec.Error(ctx, err)
849 return graphql.Null
850 }
851 if resTmp == nil {
852 if !graphql.HasFieldError(ctx, fc) {
853 ec.Errorf(ctx, "must not be null")
854 }
855 return graphql.Null
856 }
857 res := resTmp.(*models.TimelineItemConnection)
858 fc.Result = res
859 return ec.marshalNTimelineItemConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐTimelineItemConnection(ctx, field.Selections, res)
860}
861
862func (ec *executionContext) fieldContext_Bug_timeline(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
863 fc = &graphql.FieldContext{
864 Object: "Bug",
865 Field: field,
866 IsMethod: true,
867 IsResolver: true,
868 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
869 switch field.Name {
870 case "edges":
871 return ec.fieldContext_TimelineItemConnection_edges(ctx, field)
872 case "nodes":
873 return ec.fieldContext_TimelineItemConnection_nodes(ctx, field)
874 case "pageInfo":
875 return ec.fieldContext_TimelineItemConnection_pageInfo(ctx, field)
876 case "totalCount":
877 return ec.fieldContext_TimelineItemConnection_totalCount(ctx, field)
878 }
879 return nil, fmt.Errorf("no field named %q was found under type TimelineItemConnection", field.Name)
880 },
881 }
882 defer func() {
883 if r := recover(); r != nil {
884 err = ec.Recover(ctx, r)
885 ec.Error(ctx, err)
886 }
887 }()
888 ctx = graphql.WithFieldContext(ctx, fc)
889 if fc.Args, err = ec.field_Bug_timeline_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
890 ec.Error(ctx, err)
891 return
892 }
893 return fc, nil
894}
895
896func (ec *executionContext) _Bug_operations(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
897 fc, err := ec.fieldContext_Bug_operations(ctx, field)
898 if err != nil {
899 return graphql.Null
900 }
901 ctx = graphql.WithFieldContext(ctx, fc)
902 defer func() {
903 if r := recover(); r != nil {
904 ec.Error(ctx, ec.Recover(ctx, r))
905 ret = graphql.Null
906 }
907 }()
908 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
909 ctx = rctx // use context from middleware stack in children
910 return ec.resolvers.Bug().Operations(rctx, obj, fc.Args["after"].(*string), fc.Args["before"].(*string), fc.Args["first"].(*int), fc.Args["last"].(*int))
911 })
912 if err != nil {
913 ec.Error(ctx, err)
914 return graphql.Null
915 }
916 if resTmp == nil {
917 if !graphql.HasFieldError(ctx, fc) {
918 ec.Errorf(ctx, "must not be null")
919 }
920 return graphql.Null
921 }
922 res := resTmp.(*models.OperationConnection)
923 fc.Result = res
924 return ec.marshalNOperationConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOperationConnection(ctx, field.Selections, res)
925}
926
927func (ec *executionContext) fieldContext_Bug_operations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
928 fc = &graphql.FieldContext{
929 Object: "Bug",
930 Field: field,
931 IsMethod: true,
932 IsResolver: true,
933 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
934 switch field.Name {
935 case "edges":
936 return ec.fieldContext_OperationConnection_edges(ctx, field)
937 case "nodes":
938 return ec.fieldContext_OperationConnection_nodes(ctx, field)
939 case "pageInfo":
940 return ec.fieldContext_OperationConnection_pageInfo(ctx, field)
941 case "totalCount":
942 return ec.fieldContext_OperationConnection_totalCount(ctx, field)
943 }
944 return nil, fmt.Errorf("no field named %q was found under type OperationConnection", field.Name)
945 },
946 }
947 defer func() {
948 if r := recover(); r != nil {
949 err = ec.Recover(ctx, r)
950 ec.Error(ctx, err)
951 }
952 }()
953 ctx = graphql.WithFieldContext(ctx, fc)
954 if fc.Args, err = ec.field_Bug_operations_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
955 ec.Error(ctx, err)
956 return
957 }
958 return fc, nil
959}
960
961func (ec *executionContext) _BugConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) (ret graphql.Marshaler) {
962 fc, err := ec.fieldContext_BugConnection_edges(ctx, field)
963 if err != nil {
964 return graphql.Null
965 }
966 ctx = graphql.WithFieldContext(ctx, fc)
967 defer func() {
968 if r := recover(); r != nil {
969 ec.Error(ctx, ec.Recover(ctx, r))
970 ret = graphql.Null
971 }
972 }()
973 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
974 ctx = rctx // use context from middleware stack in children
975 return obj.Edges, nil
976 })
977 if err != nil {
978 ec.Error(ctx, err)
979 return graphql.Null
980 }
981 if resTmp == nil {
982 if !graphql.HasFieldError(ctx, fc) {
983 ec.Errorf(ctx, "must not be null")
984 }
985 return graphql.Null
986 }
987 res := resTmp.([]*models.BugEdge)
988 fc.Result = res
989 return ec.marshalNBugEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugEdgeᚄ(ctx, field.Selections, res)
990}
991
992func (ec *executionContext) fieldContext_BugConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
993 fc = &graphql.FieldContext{
994 Object: "BugConnection",
995 Field: field,
996 IsMethod: false,
997 IsResolver: false,
998 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
999 switch field.Name {
1000 case "cursor":
1001 return ec.fieldContext_BugEdge_cursor(ctx, field)
1002 case "node":
1003 return ec.fieldContext_BugEdge_node(ctx, field)
1004 }
1005 return nil, fmt.Errorf("no field named %q was found under type BugEdge", field.Name)
1006 },
1007 }
1008 return fc, nil
1009}
1010
1011func (ec *executionContext) _BugConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) (ret graphql.Marshaler) {
1012 fc, err := ec.fieldContext_BugConnection_nodes(ctx, field)
1013 if err != nil {
1014 return graphql.Null
1015 }
1016 ctx = graphql.WithFieldContext(ctx, fc)
1017 defer func() {
1018 if r := recover(); r != nil {
1019 ec.Error(ctx, ec.Recover(ctx, r))
1020 ret = graphql.Null
1021 }
1022 }()
1023 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1024 ctx = rctx // use context from middleware stack in children
1025 return obj.Nodes, nil
1026 })
1027 if err != nil {
1028 ec.Error(ctx, err)
1029 return graphql.Null
1030 }
1031 if resTmp == nil {
1032 if !graphql.HasFieldError(ctx, fc) {
1033 ec.Errorf(ctx, "must not be null")
1034 }
1035 return graphql.Null
1036 }
1037 res := resTmp.([]models.BugWrapper)
1038 fc.Result = res
1039 return ec.marshalNBug2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapperᚄ(ctx, field.Selections, res)
1040}
1041
1042func (ec *executionContext) fieldContext_BugConnection_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1043 fc = &graphql.FieldContext{
1044 Object: "BugConnection",
1045 Field: field,
1046 IsMethod: false,
1047 IsResolver: false,
1048 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1049 switch field.Name {
1050 case "id":
1051 return ec.fieldContext_Bug_id(ctx, field)
1052 case "humanId":
1053 return ec.fieldContext_Bug_humanId(ctx, field)
1054 case "status":
1055 return ec.fieldContext_Bug_status(ctx, field)
1056 case "title":
1057 return ec.fieldContext_Bug_title(ctx, field)
1058 case "labels":
1059 return ec.fieldContext_Bug_labels(ctx, field)
1060 case "author":
1061 return ec.fieldContext_Bug_author(ctx, field)
1062 case "createdAt":
1063 return ec.fieldContext_Bug_createdAt(ctx, field)
1064 case "lastEdit":
1065 return ec.fieldContext_Bug_lastEdit(ctx, field)
1066 case "actors":
1067 return ec.fieldContext_Bug_actors(ctx, field)
1068 case "participants":
1069 return ec.fieldContext_Bug_participants(ctx, field)
1070 case "comments":
1071 return ec.fieldContext_Bug_comments(ctx, field)
1072 case "timeline":
1073 return ec.fieldContext_Bug_timeline(ctx, field)
1074 case "operations":
1075 return ec.fieldContext_Bug_operations(ctx, field)
1076 }
1077 return nil, fmt.Errorf("no field named %q was found under type Bug", field.Name)
1078 },
1079 }
1080 return fc, nil
1081}
1082
1083func (ec *executionContext) _BugConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) (ret graphql.Marshaler) {
1084 fc, err := ec.fieldContext_BugConnection_pageInfo(ctx, field)
1085 if err != nil {
1086 return graphql.Null
1087 }
1088 ctx = graphql.WithFieldContext(ctx, fc)
1089 defer func() {
1090 if r := recover(); r != nil {
1091 ec.Error(ctx, ec.Recover(ctx, r))
1092 ret = graphql.Null
1093 }
1094 }()
1095 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1096 ctx = rctx // use context from middleware stack in children
1097 return obj.PageInfo, nil
1098 })
1099 if err != nil {
1100 ec.Error(ctx, err)
1101 return graphql.Null
1102 }
1103 if resTmp == nil {
1104 if !graphql.HasFieldError(ctx, fc) {
1105 ec.Errorf(ctx, "must not be null")
1106 }
1107 return graphql.Null
1108 }
1109 res := resTmp.(*models.PageInfo)
1110 fc.Result = res
1111 return ec.marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res)
1112}
1113
1114func (ec *executionContext) fieldContext_BugConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1115 fc = &graphql.FieldContext{
1116 Object: "BugConnection",
1117 Field: field,
1118 IsMethod: false,
1119 IsResolver: false,
1120 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1121 switch field.Name {
1122 case "hasNextPage":
1123 return ec.fieldContext_PageInfo_hasNextPage(ctx, field)
1124 case "hasPreviousPage":
1125 return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field)
1126 case "startCursor":
1127 return ec.fieldContext_PageInfo_startCursor(ctx, field)
1128 case "endCursor":
1129 return ec.fieldContext_PageInfo_endCursor(ctx, field)
1130 }
1131 return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name)
1132 },
1133 }
1134 return fc, nil
1135}
1136
1137func (ec *executionContext) _BugConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) (ret graphql.Marshaler) {
1138 fc, err := ec.fieldContext_BugConnection_totalCount(ctx, field)
1139 if err != nil {
1140 return graphql.Null
1141 }
1142 ctx = graphql.WithFieldContext(ctx, fc)
1143 defer func() {
1144 if r := recover(); r != nil {
1145 ec.Error(ctx, ec.Recover(ctx, r))
1146 ret = graphql.Null
1147 }
1148 }()
1149 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1150 ctx = rctx // use context from middleware stack in children
1151 return obj.TotalCount, nil
1152 })
1153 if err != nil {
1154 ec.Error(ctx, err)
1155 return graphql.Null
1156 }
1157 if resTmp == nil {
1158 if !graphql.HasFieldError(ctx, fc) {
1159 ec.Errorf(ctx, "must not be null")
1160 }
1161 return graphql.Null
1162 }
1163 res := resTmp.(int)
1164 fc.Result = res
1165 return ec.marshalNInt2int(ctx, field.Selections, res)
1166}
1167
1168func (ec *executionContext) fieldContext_BugConnection_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1169 fc = &graphql.FieldContext{
1170 Object: "BugConnection",
1171 Field: field,
1172 IsMethod: false,
1173 IsResolver: false,
1174 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1175 return nil, errors.New("field of type Int does not have child fields")
1176 },
1177 }
1178 return fc, nil
1179}
1180
1181func (ec *executionContext) _BugEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.BugEdge) (ret graphql.Marshaler) {
1182 fc, err := ec.fieldContext_BugEdge_cursor(ctx, field)
1183 if err != nil {
1184 return graphql.Null
1185 }
1186 ctx = graphql.WithFieldContext(ctx, fc)
1187 defer func() {
1188 if r := recover(); r != nil {
1189 ec.Error(ctx, ec.Recover(ctx, r))
1190 ret = graphql.Null
1191 }
1192 }()
1193 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1194 ctx = rctx // use context from middleware stack in children
1195 return obj.Cursor, nil
1196 })
1197 if err != nil {
1198 ec.Error(ctx, err)
1199 return graphql.Null
1200 }
1201 if resTmp == nil {
1202 if !graphql.HasFieldError(ctx, fc) {
1203 ec.Errorf(ctx, "must not be null")
1204 }
1205 return graphql.Null
1206 }
1207 res := resTmp.(string)
1208 fc.Result = res
1209 return ec.marshalNString2string(ctx, field.Selections, res)
1210}
1211
1212func (ec *executionContext) fieldContext_BugEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1213 fc = &graphql.FieldContext{
1214 Object: "BugEdge",
1215 Field: field,
1216 IsMethod: false,
1217 IsResolver: false,
1218 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1219 return nil, errors.New("field of type String does not have child fields")
1220 },
1221 }
1222 return fc, nil
1223}
1224
1225func (ec *executionContext) _BugEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.BugEdge) (ret graphql.Marshaler) {
1226 fc, err := ec.fieldContext_BugEdge_node(ctx, field)
1227 if err != nil {
1228 return graphql.Null
1229 }
1230 ctx = graphql.WithFieldContext(ctx, fc)
1231 defer func() {
1232 if r := recover(); r != nil {
1233 ec.Error(ctx, ec.Recover(ctx, r))
1234 ret = graphql.Null
1235 }
1236 }()
1237 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1238 ctx = rctx // use context from middleware stack in children
1239 return obj.Node, nil
1240 })
1241 if err != nil {
1242 ec.Error(ctx, err)
1243 return graphql.Null
1244 }
1245 if resTmp == nil {
1246 if !graphql.HasFieldError(ctx, fc) {
1247 ec.Errorf(ctx, "must not be null")
1248 }
1249 return graphql.Null
1250 }
1251 res := resTmp.(models.BugWrapper)
1252 fc.Result = res
1253 return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res)
1254}
1255
1256func (ec *executionContext) fieldContext_BugEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1257 fc = &graphql.FieldContext{
1258 Object: "BugEdge",
1259 Field: field,
1260 IsMethod: false,
1261 IsResolver: false,
1262 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1263 switch field.Name {
1264 case "id":
1265 return ec.fieldContext_Bug_id(ctx, field)
1266 case "humanId":
1267 return ec.fieldContext_Bug_humanId(ctx, field)
1268 case "status":
1269 return ec.fieldContext_Bug_status(ctx, field)
1270 case "title":
1271 return ec.fieldContext_Bug_title(ctx, field)
1272 case "labels":
1273 return ec.fieldContext_Bug_labels(ctx, field)
1274 case "author":
1275 return ec.fieldContext_Bug_author(ctx, field)
1276 case "createdAt":
1277 return ec.fieldContext_Bug_createdAt(ctx, field)
1278 case "lastEdit":
1279 return ec.fieldContext_Bug_lastEdit(ctx, field)
1280 case "actors":
1281 return ec.fieldContext_Bug_actors(ctx, field)
1282 case "participants":
1283 return ec.fieldContext_Bug_participants(ctx, field)
1284 case "comments":
1285 return ec.fieldContext_Bug_comments(ctx, field)
1286 case "timeline":
1287 return ec.fieldContext_Bug_timeline(ctx, field)
1288 case "operations":
1289 return ec.fieldContext_Bug_operations(ctx, field)
1290 }
1291 return nil, fmt.Errorf("no field named %q was found under type Bug", field.Name)
1292 },
1293 }
1294 return fc, nil
1295}
1296
1297func (ec *executionContext) _Comment_author(ctx context.Context, field graphql.CollectedField, obj *bug.Comment) (ret graphql.Marshaler) {
1298 fc, err := ec.fieldContext_Comment_author(ctx, field)
1299 if err != nil {
1300 return graphql.Null
1301 }
1302 ctx = graphql.WithFieldContext(ctx, fc)
1303 defer func() {
1304 if r := recover(); r != nil {
1305 ec.Error(ctx, ec.Recover(ctx, r))
1306 ret = graphql.Null
1307 }
1308 }()
1309 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1310 ctx = rctx // use context from middleware stack in children
1311 return ec.resolvers.Comment().Author(rctx, obj)
1312 })
1313 if err != nil {
1314 ec.Error(ctx, err)
1315 return graphql.Null
1316 }
1317 if resTmp == nil {
1318 if !graphql.HasFieldError(ctx, fc) {
1319 ec.Errorf(ctx, "must not be null")
1320 }
1321 return graphql.Null
1322 }
1323 res := resTmp.(models.IdentityWrapper)
1324 fc.Result = res
1325 return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
1326}
1327
1328func (ec *executionContext) fieldContext_Comment_author(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1329 fc = &graphql.FieldContext{
1330 Object: "Comment",
1331 Field: field,
1332 IsMethod: true,
1333 IsResolver: true,
1334 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1335 switch field.Name {
1336 case "id":
1337 return ec.fieldContext_Identity_id(ctx, field)
1338 case "humanId":
1339 return ec.fieldContext_Identity_humanId(ctx, field)
1340 case "name":
1341 return ec.fieldContext_Identity_name(ctx, field)
1342 case "email":
1343 return ec.fieldContext_Identity_email(ctx, field)
1344 case "login":
1345 return ec.fieldContext_Identity_login(ctx, field)
1346 case "displayName":
1347 return ec.fieldContext_Identity_displayName(ctx, field)
1348 case "avatarUrl":
1349 return ec.fieldContext_Identity_avatarUrl(ctx, field)
1350 case "isProtected":
1351 return ec.fieldContext_Identity_isProtected(ctx, field)
1352 }
1353 return nil, fmt.Errorf("no field named %q was found under type Identity", field.Name)
1354 },
1355 }
1356 return fc, nil
1357}
1358
1359func (ec *executionContext) _Comment_message(ctx context.Context, field graphql.CollectedField, obj *bug.Comment) (ret graphql.Marshaler) {
1360 fc, err := ec.fieldContext_Comment_message(ctx, field)
1361 if err != nil {
1362 return graphql.Null
1363 }
1364 ctx = graphql.WithFieldContext(ctx, fc)
1365 defer func() {
1366 if r := recover(); r != nil {
1367 ec.Error(ctx, ec.Recover(ctx, r))
1368 ret = graphql.Null
1369 }
1370 }()
1371 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1372 ctx = rctx // use context from middleware stack in children
1373 return obj.Message, nil
1374 })
1375 if err != nil {
1376 ec.Error(ctx, err)
1377 return graphql.Null
1378 }
1379 if resTmp == nil {
1380 if !graphql.HasFieldError(ctx, fc) {
1381 ec.Errorf(ctx, "must not be null")
1382 }
1383 return graphql.Null
1384 }
1385 res := resTmp.(string)
1386 fc.Result = res
1387 return ec.marshalNString2string(ctx, field.Selections, res)
1388}
1389
1390func (ec *executionContext) fieldContext_Comment_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1391 fc = &graphql.FieldContext{
1392 Object: "Comment",
1393 Field: field,
1394 IsMethod: false,
1395 IsResolver: false,
1396 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1397 return nil, errors.New("field of type String does not have child fields")
1398 },
1399 }
1400 return fc, nil
1401}
1402
1403func (ec *executionContext) _Comment_files(ctx context.Context, field graphql.CollectedField, obj *bug.Comment) (ret graphql.Marshaler) {
1404 fc, err := ec.fieldContext_Comment_files(ctx, field)
1405 if err != nil {
1406 return graphql.Null
1407 }
1408 ctx = graphql.WithFieldContext(ctx, fc)
1409 defer func() {
1410 if r := recover(); r != nil {
1411 ec.Error(ctx, ec.Recover(ctx, r))
1412 ret = graphql.Null
1413 }
1414 }()
1415 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1416 ctx = rctx // use context from middleware stack in children
1417 return obj.Files, nil
1418 })
1419 if err != nil {
1420 ec.Error(ctx, err)
1421 return graphql.Null
1422 }
1423 if resTmp == nil {
1424 if !graphql.HasFieldError(ctx, fc) {
1425 ec.Errorf(ctx, "must not be null")
1426 }
1427 return graphql.Null
1428 }
1429 res := resTmp.([]repository.Hash)
1430 fc.Result = res
1431 return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, field.Selections, res)
1432}
1433
1434func (ec *executionContext) fieldContext_Comment_files(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1435 fc = &graphql.FieldContext{
1436 Object: "Comment",
1437 Field: field,
1438 IsMethod: false,
1439 IsResolver: false,
1440 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1441 return nil, errors.New("field of type Hash does not have child fields")
1442 },
1443 }
1444 return fc, nil
1445}
1446
1447func (ec *executionContext) _CommentConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) (ret graphql.Marshaler) {
1448 fc, err := ec.fieldContext_CommentConnection_edges(ctx, field)
1449 if err != nil {
1450 return graphql.Null
1451 }
1452 ctx = graphql.WithFieldContext(ctx, fc)
1453 defer func() {
1454 if r := recover(); r != nil {
1455 ec.Error(ctx, ec.Recover(ctx, r))
1456 ret = graphql.Null
1457 }
1458 }()
1459 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1460 ctx = rctx // use context from middleware stack in children
1461 return obj.Edges, nil
1462 })
1463 if err != nil {
1464 ec.Error(ctx, err)
1465 return graphql.Null
1466 }
1467 if resTmp == nil {
1468 if !graphql.HasFieldError(ctx, fc) {
1469 ec.Errorf(ctx, "must not be null")
1470 }
1471 return graphql.Null
1472 }
1473 res := resTmp.([]*models.CommentEdge)
1474 fc.Result = res
1475 return ec.marshalNCommentEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCommentEdgeᚄ(ctx, field.Selections, res)
1476}
1477
1478func (ec *executionContext) fieldContext_CommentConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1479 fc = &graphql.FieldContext{
1480 Object: "CommentConnection",
1481 Field: field,
1482 IsMethod: false,
1483 IsResolver: false,
1484 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1485 switch field.Name {
1486 case "cursor":
1487 return ec.fieldContext_CommentEdge_cursor(ctx, field)
1488 case "node":
1489 return ec.fieldContext_CommentEdge_node(ctx, field)
1490 }
1491 return nil, fmt.Errorf("no field named %q was found under type CommentEdge", field.Name)
1492 },
1493 }
1494 return fc, nil
1495}
1496
1497func (ec *executionContext) _CommentConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) (ret graphql.Marshaler) {
1498 fc, err := ec.fieldContext_CommentConnection_nodes(ctx, field)
1499 if err != nil {
1500 return graphql.Null
1501 }
1502 ctx = graphql.WithFieldContext(ctx, fc)
1503 defer func() {
1504 if r := recover(); r != nil {
1505 ec.Error(ctx, ec.Recover(ctx, r))
1506 ret = graphql.Null
1507 }
1508 }()
1509 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1510 ctx = rctx // use context from middleware stack in children
1511 return obj.Nodes, nil
1512 })
1513 if err != nil {
1514 ec.Error(ctx, err)
1515 return graphql.Null
1516 }
1517 if resTmp == nil {
1518 if !graphql.HasFieldError(ctx, fc) {
1519 ec.Errorf(ctx, "must not be null")
1520 }
1521 return graphql.Null
1522 }
1523 res := resTmp.([]*bug.Comment)
1524 fc.Result = res
1525 return ec.marshalNComment2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐCommentᚄ(ctx, field.Selections, res)
1526}
1527
1528func (ec *executionContext) fieldContext_CommentConnection_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1529 fc = &graphql.FieldContext{
1530 Object: "CommentConnection",
1531 Field: field,
1532 IsMethod: false,
1533 IsResolver: false,
1534 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1535 switch field.Name {
1536 case "author":
1537 return ec.fieldContext_Comment_author(ctx, field)
1538 case "message":
1539 return ec.fieldContext_Comment_message(ctx, field)
1540 case "files":
1541 return ec.fieldContext_Comment_files(ctx, field)
1542 }
1543 return nil, fmt.Errorf("no field named %q was found under type Comment", field.Name)
1544 },
1545 }
1546 return fc, nil
1547}
1548
1549func (ec *executionContext) _CommentConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) (ret graphql.Marshaler) {
1550 fc, err := ec.fieldContext_CommentConnection_pageInfo(ctx, field)
1551 if err != nil {
1552 return graphql.Null
1553 }
1554 ctx = graphql.WithFieldContext(ctx, fc)
1555 defer func() {
1556 if r := recover(); r != nil {
1557 ec.Error(ctx, ec.Recover(ctx, r))
1558 ret = graphql.Null
1559 }
1560 }()
1561 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1562 ctx = rctx // use context from middleware stack in children
1563 return obj.PageInfo, nil
1564 })
1565 if err != nil {
1566 ec.Error(ctx, err)
1567 return graphql.Null
1568 }
1569 if resTmp == nil {
1570 if !graphql.HasFieldError(ctx, fc) {
1571 ec.Errorf(ctx, "must not be null")
1572 }
1573 return graphql.Null
1574 }
1575 res := resTmp.(*models.PageInfo)
1576 fc.Result = res
1577 return ec.marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res)
1578}
1579
1580func (ec *executionContext) fieldContext_CommentConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1581 fc = &graphql.FieldContext{
1582 Object: "CommentConnection",
1583 Field: field,
1584 IsMethod: false,
1585 IsResolver: false,
1586 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1587 switch field.Name {
1588 case "hasNextPage":
1589 return ec.fieldContext_PageInfo_hasNextPage(ctx, field)
1590 case "hasPreviousPage":
1591 return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field)
1592 case "startCursor":
1593 return ec.fieldContext_PageInfo_startCursor(ctx, field)
1594 case "endCursor":
1595 return ec.fieldContext_PageInfo_endCursor(ctx, field)
1596 }
1597 return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name)
1598 },
1599 }
1600 return fc, nil
1601}
1602
1603func (ec *executionContext) _CommentConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) (ret graphql.Marshaler) {
1604 fc, err := ec.fieldContext_CommentConnection_totalCount(ctx, field)
1605 if err != nil {
1606 return graphql.Null
1607 }
1608 ctx = graphql.WithFieldContext(ctx, fc)
1609 defer func() {
1610 if r := recover(); r != nil {
1611 ec.Error(ctx, ec.Recover(ctx, r))
1612 ret = graphql.Null
1613 }
1614 }()
1615 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1616 ctx = rctx // use context from middleware stack in children
1617 return obj.TotalCount, nil
1618 })
1619 if err != nil {
1620 ec.Error(ctx, err)
1621 return graphql.Null
1622 }
1623 if resTmp == nil {
1624 if !graphql.HasFieldError(ctx, fc) {
1625 ec.Errorf(ctx, "must not be null")
1626 }
1627 return graphql.Null
1628 }
1629 res := resTmp.(int)
1630 fc.Result = res
1631 return ec.marshalNInt2int(ctx, field.Selections, res)
1632}
1633
1634func (ec *executionContext) fieldContext_CommentConnection_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1635 fc = &graphql.FieldContext{
1636 Object: "CommentConnection",
1637 Field: field,
1638 IsMethod: false,
1639 IsResolver: false,
1640 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1641 return nil, errors.New("field of type Int does not have child fields")
1642 },
1643 }
1644 return fc, nil
1645}
1646
1647func (ec *executionContext) _CommentEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.CommentEdge) (ret graphql.Marshaler) {
1648 fc, err := ec.fieldContext_CommentEdge_cursor(ctx, field)
1649 if err != nil {
1650 return graphql.Null
1651 }
1652 ctx = graphql.WithFieldContext(ctx, fc)
1653 defer func() {
1654 if r := recover(); r != nil {
1655 ec.Error(ctx, ec.Recover(ctx, r))
1656 ret = graphql.Null
1657 }
1658 }()
1659 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1660 ctx = rctx // use context from middleware stack in children
1661 return obj.Cursor, nil
1662 })
1663 if err != nil {
1664 ec.Error(ctx, err)
1665 return graphql.Null
1666 }
1667 if resTmp == nil {
1668 if !graphql.HasFieldError(ctx, fc) {
1669 ec.Errorf(ctx, "must not be null")
1670 }
1671 return graphql.Null
1672 }
1673 res := resTmp.(string)
1674 fc.Result = res
1675 return ec.marshalNString2string(ctx, field.Selections, res)
1676}
1677
1678func (ec *executionContext) fieldContext_CommentEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1679 fc = &graphql.FieldContext{
1680 Object: "CommentEdge",
1681 Field: field,
1682 IsMethod: false,
1683 IsResolver: false,
1684 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1685 return nil, errors.New("field of type String does not have child fields")
1686 },
1687 }
1688 return fc, nil
1689}
1690
1691func (ec *executionContext) _CommentEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.CommentEdge) (ret graphql.Marshaler) {
1692 fc, err := ec.fieldContext_CommentEdge_node(ctx, field)
1693 if err != nil {
1694 return graphql.Null
1695 }
1696 ctx = graphql.WithFieldContext(ctx, fc)
1697 defer func() {
1698 if r := recover(); r != nil {
1699 ec.Error(ctx, ec.Recover(ctx, r))
1700 ret = graphql.Null
1701 }
1702 }()
1703 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1704 ctx = rctx // use context from middleware stack in children
1705 return obj.Node, nil
1706 })
1707 if err != nil {
1708 ec.Error(ctx, err)
1709 return graphql.Null
1710 }
1711 if resTmp == nil {
1712 if !graphql.HasFieldError(ctx, fc) {
1713 ec.Errorf(ctx, "must not be null")
1714 }
1715 return graphql.Null
1716 }
1717 res := resTmp.(*bug.Comment)
1718 fc.Result = res
1719 return ec.marshalNComment2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐComment(ctx, field.Selections, res)
1720}
1721
1722func (ec *executionContext) fieldContext_CommentEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1723 fc = &graphql.FieldContext{
1724 Object: "CommentEdge",
1725 Field: field,
1726 IsMethod: false,
1727 IsResolver: false,
1728 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1729 switch field.Name {
1730 case "author":
1731 return ec.fieldContext_Comment_author(ctx, field)
1732 case "message":
1733 return ec.fieldContext_Comment_message(ctx, field)
1734 case "files":
1735 return ec.fieldContext_Comment_files(ctx, field)
1736 }
1737 return nil, fmt.Errorf("no field named %q was found under type Comment", field.Name)
1738 },
1739 }
1740 return fc, nil
1741}
1742
1743// endregion **************************** field.gotpl *****************************
1744
1745// region **************************** input.gotpl *****************************
1746
1747// endregion **************************** input.gotpl *****************************
1748
1749// region ************************** interface.gotpl ***************************
1750
1751// endregion ************************** interface.gotpl ***************************
1752
1753// region **************************** object.gotpl ****************************
1754
1755var bugImplementors = []string{"Bug", "Authored"}
1756
1757func (ec *executionContext) _Bug(ctx context.Context, sel ast.SelectionSet, obj models.BugWrapper) graphql.Marshaler {
1758 fields := graphql.CollectFields(ec.OperationContext, sel, bugImplementors)
1759 out := graphql.NewFieldSet(fields)
1760 var invalids uint32
1761 for i, field := range fields {
1762 switch field.Name {
1763 case "__typename":
1764 out.Values[i] = graphql.MarshalString("Bug")
1765 case "id":
1766 field := field
1767
1768 innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
1769 defer func() {
1770 if r := recover(); r != nil {
1771 ec.Error(ctx, ec.Recover(ctx, r))
1772 }
1773 }()
1774 res = ec._Bug_id(ctx, field, obj)
1775 if res == graphql.Null {
1776 atomic.AddUint32(&invalids, 1)
1777 }
1778 return res
1779 }
1780
1781 out.Concurrently(i, func() graphql.Marshaler {
1782 return innerFunc(ctx)
1783
1784 })
1785 case "humanId":
1786 field := field
1787
1788 innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
1789 defer func() {
1790 if r := recover(); r != nil {
1791 ec.Error(ctx, ec.Recover(ctx, r))
1792 }
1793 }()
1794 res = ec._Bug_humanId(ctx, field, obj)
1795 if res == graphql.Null {
1796 atomic.AddUint32(&invalids, 1)
1797 }
1798 return res
1799 }
1800
1801 out.Concurrently(i, func() graphql.Marshaler {
1802 return innerFunc(ctx)
1803
1804 })
1805 case "status":
1806
1807 out.Values[i] = ec._Bug_status(ctx, field, obj)
1808
1809 if out.Values[i] == graphql.Null {
1810 atomic.AddUint32(&invalids, 1)
1811 }
1812 case "title":
1813
1814 out.Values[i] = ec._Bug_title(ctx, field, obj)
1815
1816 if out.Values[i] == graphql.Null {
1817 atomic.AddUint32(&invalids, 1)
1818 }
1819 case "labels":
1820
1821 out.Values[i] = ec._Bug_labels(ctx, field, obj)
1822
1823 if out.Values[i] == graphql.Null {
1824 atomic.AddUint32(&invalids, 1)
1825 }
1826 case "author":
1827
1828 out.Values[i] = ec._Bug_author(ctx, field, obj)
1829
1830 if out.Values[i] == graphql.Null {
1831 atomic.AddUint32(&invalids, 1)
1832 }
1833 case "createdAt":
1834
1835 out.Values[i] = ec._Bug_createdAt(ctx, field, obj)
1836
1837 if out.Values[i] == graphql.Null {
1838 atomic.AddUint32(&invalids, 1)
1839 }
1840 case "lastEdit":
1841
1842 out.Values[i] = ec._Bug_lastEdit(ctx, field, obj)
1843
1844 if out.Values[i] == graphql.Null {
1845 atomic.AddUint32(&invalids, 1)
1846 }
1847 case "actors":
1848 field := field
1849
1850 innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
1851 defer func() {
1852 if r := recover(); r != nil {
1853 ec.Error(ctx, ec.Recover(ctx, r))
1854 }
1855 }()
1856 res = ec._Bug_actors(ctx, field, obj)
1857 if res == graphql.Null {
1858 atomic.AddUint32(&invalids, 1)
1859 }
1860 return res
1861 }
1862
1863 out.Concurrently(i, func() graphql.Marshaler {
1864 return innerFunc(ctx)
1865
1866 })
1867 case "participants":
1868 field := field
1869
1870 innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
1871 defer func() {
1872 if r := recover(); r != nil {
1873 ec.Error(ctx, ec.Recover(ctx, r))
1874 }
1875 }()
1876 res = ec._Bug_participants(ctx, field, obj)
1877 if res == graphql.Null {
1878 atomic.AddUint32(&invalids, 1)
1879 }
1880 return res
1881 }
1882
1883 out.Concurrently(i, func() graphql.Marshaler {
1884 return innerFunc(ctx)
1885
1886 })
1887 case "comments":
1888 field := field
1889
1890 innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
1891 defer func() {
1892 if r := recover(); r != nil {
1893 ec.Error(ctx, ec.Recover(ctx, r))
1894 }
1895 }()
1896 res = ec._Bug_comments(ctx, field, obj)
1897 if res == graphql.Null {
1898 atomic.AddUint32(&invalids, 1)
1899 }
1900 return res
1901 }
1902
1903 out.Concurrently(i, func() graphql.Marshaler {
1904 return innerFunc(ctx)
1905
1906 })
1907 case "timeline":
1908 field := field
1909
1910 innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
1911 defer func() {
1912 if r := recover(); r != nil {
1913 ec.Error(ctx, ec.Recover(ctx, r))
1914 }
1915 }()
1916 res = ec._Bug_timeline(ctx, field, obj)
1917 if res == graphql.Null {
1918 atomic.AddUint32(&invalids, 1)
1919 }
1920 return res
1921 }
1922
1923 out.Concurrently(i, func() graphql.Marshaler {
1924 return innerFunc(ctx)
1925
1926 })
1927 case "operations":
1928 field := field
1929
1930 innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
1931 defer func() {
1932 if r := recover(); r != nil {
1933 ec.Error(ctx, ec.Recover(ctx, r))
1934 }
1935 }()
1936 res = ec._Bug_operations(ctx, field, obj)
1937 if res == graphql.Null {
1938 atomic.AddUint32(&invalids, 1)
1939 }
1940 return res
1941 }
1942
1943 out.Concurrently(i, func() graphql.Marshaler {
1944 return innerFunc(ctx)
1945
1946 })
1947 default:
1948 panic("unknown field " + strconv.Quote(field.Name))
1949 }
1950 }
1951 out.Dispatch()
1952 if invalids > 0 {
1953 return graphql.Null
1954 }
1955 return out
1956}
1957
1958var bugConnectionImplementors = []string{"BugConnection"}
1959
1960func (ec *executionContext) _BugConnection(ctx context.Context, sel ast.SelectionSet, obj *models.BugConnection) graphql.Marshaler {
1961 fields := graphql.CollectFields(ec.OperationContext, sel, bugConnectionImplementors)
1962 out := graphql.NewFieldSet(fields)
1963 var invalids uint32
1964 for i, field := range fields {
1965 switch field.Name {
1966 case "__typename":
1967 out.Values[i] = graphql.MarshalString("BugConnection")
1968 case "edges":
1969
1970 out.Values[i] = ec._BugConnection_edges(ctx, field, obj)
1971
1972 if out.Values[i] == graphql.Null {
1973 invalids++
1974 }
1975 case "nodes":
1976
1977 out.Values[i] = ec._BugConnection_nodes(ctx, field, obj)
1978
1979 if out.Values[i] == graphql.Null {
1980 invalids++
1981 }
1982 case "pageInfo":
1983
1984 out.Values[i] = ec._BugConnection_pageInfo(ctx, field, obj)
1985
1986 if out.Values[i] == graphql.Null {
1987 invalids++
1988 }
1989 case "totalCount":
1990
1991 out.Values[i] = ec._BugConnection_totalCount(ctx, field, obj)
1992
1993 if out.Values[i] == graphql.Null {
1994 invalids++
1995 }
1996 default:
1997 panic("unknown field " + strconv.Quote(field.Name))
1998 }
1999 }
2000 out.Dispatch()
2001 if invalids > 0 {
2002 return graphql.Null
2003 }
2004 return out
2005}
2006
2007var bugEdgeImplementors = []string{"BugEdge"}
2008
2009func (ec *executionContext) _BugEdge(ctx context.Context, sel ast.SelectionSet, obj *models.BugEdge) graphql.Marshaler {
2010 fields := graphql.CollectFields(ec.OperationContext, sel, bugEdgeImplementors)
2011 out := graphql.NewFieldSet(fields)
2012 var invalids uint32
2013 for i, field := range fields {
2014 switch field.Name {
2015 case "__typename":
2016 out.Values[i] = graphql.MarshalString("BugEdge")
2017 case "cursor":
2018
2019 out.Values[i] = ec._BugEdge_cursor(ctx, field, obj)
2020
2021 if out.Values[i] == graphql.Null {
2022 invalids++
2023 }
2024 case "node":
2025
2026 out.Values[i] = ec._BugEdge_node(ctx, field, obj)
2027
2028 if out.Values[i] == graphql.Null {
2029 invalids++
2030 }
2031 default:
2032 panic("unknown field " + strconv.Quote(field.Name))
2033 }
2034 }
2035 out.Dispatch()
2036 if invalids > 0 {
2037 return graphql.Null
2038 }
2039 return out
2040}
2041
2042var commentImplementors = []string{"Comment", "Authored"}
2043
2044func (ec *executionContext) _Comment(ctx context.Context, sel ast.SelectionSet, obj *bug.Comment) graphql.Marshaler {
2045 fields := graphql.CollectFields(ec.OperationContext, sel, commentImplementors)
2046 out := graphql.NewFieldSet(fields)
2047 var invalids uint32
2048 for i, field := range fields {
2049 switch field.Name {
2050 case "__typename":
2051 out.Values[i] = graphql.MarshalString("Comment")
2052 case "author":
2053 field := field
2054
2055 innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
2056 defer func() {
2057 if r := recover(); r != nil {
2058 ec.Error(ctx, ec.Recover(ctx, r))
2059 }
2060 }()
2061 res = ec._Comment_author(ctx, field, obj)
2062 if res == graphql.Null {
2063 atomic.AddUint32(&invalids, 1)
2064 }
2065 return res
2066 }
2067
2068 out.Concurrently(i, func() graphql.Marshaler {
2069 return innerFunc(ctx)
2070
2071 })
2072 case "message":
2073
2074 out.Values[i] = ec._Comment_message(ctx, field, obj)
2075
2076 if out.Values[i] == graphql.Null {
2077 atomic.AddUint32(&invalids, 1)
2078 }
2079 case "files":
2080
2081 out.Values[i] = ec._Comment_files(ctx, field, obj)
2082
2083 if out.Values[i] == graphql.Null {
2084 atomic.AddUint32(&invalids, 1)
2085 }
2086 default:
2087 panic("unknown field " + strconv.Quote(field.Name))
2088 }
2089 }
2090 out.Dispatch()
2091 if invalids > 0 {
2092 return graphql.Null
2093 }
2094 return out
2095}
2096
2097var commentConnectionImplementors = []string{"CommentConnection"}
2098
2099func (ec *executionContext) _CommentConnection(ctx context.Context, sel ast.SelectionSet, obj *models.CommentConnection) graphql.Marshaler {
2100 fields := graphql.CollectFields(ec.OperationContext, sel, commentConnectionImplementors)
2101 out := graphql.NewFieldSet(fields)
2102 var invalids uint32
2103 for i, field := range fields {
2104 switch field.Name {
2105 case "__typename":
2106 out.Values[i] = graphql.MarshalString("CommentConnection")
2107 case "edges":
2108
2109 out.Values[i] = ec._CommentConnection_edges(ctx, field, obj)
2110
2111 if out.Values[i] == graphql.Null {
2112 invalids++
2113 }
2114 case "nodes":
2115
2116 out.Values[i] = ec._CommentConnection_nodes(ctx, field, obj)
2117
2118 if out.Values[i] == graphql.Null {
2119 invalids++
2120 }
2121 case "pageInfo":
2122
2123 out.Values[i] = ec._CommentConnection_pageInfo(ctx, field, obj)
2124
2125 if out.Values[i] == graphql.Null {
2126 invalids++
2127 }
2128 case "totalCount":
2129
2130 out.Values[i] = ec._CommentConnection_totalCount(ctx, field, obj)
2131
2132 if out.Values[i] == graphql.Null {
2133 invalids++
2134 }
2135 default:
2136 panic("unknown field " + strconv.Quote(field.Name))
2137 }
2138 }
2139 out.Dispatch()
2140 if invalids > 0 {
2141 return graphql.Null
2142 }
2143 return out
2144}
2145
2146var commentEdgeImplementors = []string{"CommentEdge"}
2147
2148func (ec *executionContext) _CommentEdge(ctx context.Context, sel ast.SelectionSet, obj *models.CommentEdge) graphql.Marshaler {
2149 fields := graphql.CollectFields(ec.OperationContext, sel, commentEdgeImplementors)
2150 out := graphql.NewFieldSet(fields)
2151 var invalids uint32
2152 for i, field := range fields {
2153 switch field.Name {
2154 case "__typename":
2155 out.Values[i] = graphql.MarshalString("CommentEdge")
2156 case "cursor":
2157
2158 out.Values[i] = ec._CommentEdge_cursor(ctx, field, obj)
2159
2160 if out.Values[i] == graphql.Null {
2161 invalids++
2162 }
2163 case "node":
2164
2165 out.Values[i] = ec._CommentEdge_node(ctx, field, obj)
2166
2167 if out.Values[i] == graphql.Null {
2168 invalids++
2169 }
2170 default:
2171 panic("unknown field " + strconv.Quote(field.Name))
2172 }
2173 }
2174 out.Dispatch()
2175 if invalids > 0 {
2176 return graphql.Null
2177 }
2178 return out
2179}
2180
2181// endregion **************************** object.gotpl ****************************
2182
2183// region ***************************** type.gotpl *****************************
2184
2185func (ec *executionContext) marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx context.Context, sel ast.SelectionSet, v models.BugWrapper) graphql.Marshaler {
2186 if v == nil {
2187 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
2188 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
2189 }
2190 return graphql.Null
2191 }
2192 return ec._Bug(ctx, sel, v)
2193}
2194
2195func (ec *executionContext) marshalNBug2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapperᚄ(ctx context.Context, sel ast.SelectionSet, v []models.BugWrapper) graphql.Marshaler {
2196 ret := make(graphql.Array, len(v))
2197 var wg sync.WaitGroup
2198 isLen1 := len(v) == 1
2199 if !isLen1 {
2200 wg.Add(len(v))
2201 }
2202 for i := range v {
2203 i := i
2204 fc := &graphql.FieldContext{
2205 Index: &i,
2206 Result: &v[i],
2207 }
2208 ctx := graphql.WithFieldContext(ctx, fc)
2209 f := func(i int) {
2210 defer func() {
2211 if r := recover(); r != nil {
2212 ec.Error(ctx, ec.Recover(ctx, r))
2213 ret = nil
2214 }
2215 }()
2216 if !isLen1 {
2217 defer wg.Done()
2218 }
2219 ret[i] = ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, sel, v[i])
2220 }
2221 if isLen1 {
2222 f(i)
2223 } else {
2224 go f(i)
2225 }
2226
2227 }
2228 wg.Wait()
2229
2230 for _, e := range ret {
2231 if e == graphql.Null {
2232 return graphql.Null
2233 }
2234 }
2235
2236 return ret
2237}
2238
2239func (ec *executionContext) marshalNBugConnection2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugConnection(ctx context.Context, sel ast.SelectionSet, v models.BugConnection) graphql.Marshaler {
2240 return ec._BugConnection(ctx, sel, &v)
2241}
2242
2243func (ec *executionContext) marshalNBugConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugConnection(ctx context.Context, sel ast.SelectionSet, v *models.BugConnection) graphql.Marshaler {
2244 if v == nil {
2245 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
2246 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
2247 }
2248 return graphql.Null
2249 }
2250 return ec._BugConnection(ctx, sel, v)
2251}
2252
2253func (ec *executionContext) marshalNBugEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.BugEdge) graphql.Marshaler {
2254 ret := make(graphql.Array, len(v))
2255 var wg sync.WaitGroup
2256 isLen1 := len(v) == 1
2257 if !isLen1 {
2258 wg.Add(len(v))
2259 }
2260 for i := range v {
2261 i := i
2262 fc := &graphql.FieldContext{
2263 Index: &i,
2264 Result: &v[i],
2265 }
2266 ctx := graphql.WithFieldContext(ctx, fc)
2267 f := func(i int) {
2268 defer func() {
2269 if r := recover(); r != nil {
2270 ec.Error(ctx, ec.Recover(ctx, r))
2271 ret = nil
2272 }
2273 }()
2274 if !isLen1 {
2275 defer wg.Done()
2276 }
2277 ret[i] = ec.marshalNBugEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugEdge(ctx, sel, v[i])
2278 }
2279 if isLen1 {
2280 f(i)
2281 } else {
2282 go f(i)
2283 }
2284
2285 }
2286 wg.Wait()
2287
2288 for _, e := range ret {
2289 if e == graphql.Null {
2290 return graphql.Null
2291 }
2292 }
2293
2294 return ret
2295}
2296
2297func (ec *executionContext) marshalNBugEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugEdge(ctx context.Context, sel ast.SelectionSet, v *models.BugEdge) graphql.Marshaler {
2298 if v == nil {
2299 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
2300 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
2301 }
2302 return graphql.Null
2303 }
2304 return ec._BugEdge(ctx, sel, v)
2305}
2306
2307func (ec *executionContext) marshalNComment2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐCommentᚄ(ctx context.Context, sel ast.SelectionSet, v []*bug.Comment) graphql.Marshaler {
2308 ret := make(graphql.Array, len(v))
2309 var wg sync.WaitGroup
2310 isLen1 := len(v) == 1
2311 if !isLen1 {
2312 wg.Add(len(v))
2313 }
2314 for i := range v {
2315 i := i
2316 fc := &graphql.FieldContext{
2317 Index: &i,
2318 Result: &v[i],
2319 }
2320 ctx := graphql.WithFieldContext(ctx, fc)
2321 f := func(i int) {
2322 defer func() {
2323 if r := recover(); r != nil {
2324 ec.Error(ctx, ec.Recover(ctx, r))
2325 ret = nil
2326 }
2327 }()
2328 if !isLen1 {
2329 defer wg.Done()
2330 }
2331 ret[i] = ec.marshalNComment2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐComment(ctx, sel, v[i])
2332 }
2333 if isLen1 {
2334 f(i)
2335 } else {
2336 go f(i)
2337 }
2338
2339 }
2340 wg.Wait()
2341
2342 for _, e := range ret {
2343 if e == graphql.Null {
2344 return graphql.Null
2345 }
2346 }
2347
2348 return ret
2349}
2350
2351func (ec *executionContext) marshalNComment2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐComment(ctx context.Context, sel ast.SelectionSet, v *bug.Comment) graphql.Marshaler {
2352 if v == nil {
2353 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
2354 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
2355 }
2356 return graphql.Null
2357 }
2358 return ec._Comment(ctx, sel, v)
2359}
2360
2361func (ec *executionContext) marshalNCommentConnection2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCommentConnection(ctx context.Context, sel ast.SelectionSet, v models.CommentConnection) graphql.Marshaler {
2362 return ec._CommentConnection(ctx, sel, &v)
2363}
2364
2365func (ec *executionContext) marshalNCommentConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCommentConnection(ctx context.Context, sel ast.SelectionSet, v *models.CommentConnection) graphql.Marshaler {
2366 if v == nil {
2367 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
2368 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
2369 }
2370 return graphql.Null
2371 }
2372 return ec._CommentConnection(ctx, sel, v)
2373}
2374
2375func (ec *executionContext) marshalNCommentEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCommentEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.CommentEdge) graphql.Marshaler {
2376 ret := make(graphql.Array, len(v))
2377 var wg sync.WaitGroup
2378 isLen1 := len(v) == 1
2379 if !isLen1 {
2380 wg.Add(len(v))
2381 }
2382 for i := range v {
2383 i := i
2384 fc := &graphql.FieldContext{
2385 Index: &i,
2386 Result: &v[i],
2387 }
2388 ctx := graphql.WithFieldContext(ctx, fc)
2389 f := func(i int) {
2390 defer func() {
2391 if r := recover(); r != nil {
2392 ec.Error(ctx, ec.Recover(ctx, r))
2393 ret = nil
2394 }
2395 }()
2396 if !isLen1 {
2397 defer wg.Done()
2398 }
2399 ret[i] = ec.marshalNCommentEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCommentEdge(ctx, sel, v[i])
2400 }
2401 if isLen1 {
2402 f(i)
2403 } else {
2404 go f(i)
2405 }
2406
2407 }
2408 wg.Wait()
2409
2410 for _, e := range ret {
2411 if e == graphql.Null {
2412 return graphql.Null
2413 }
2414 }
2415
2416 return ret
2417}
2418
2419func (ec *executionContext) marshalNCommentEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCommentEdge(ctx context.Context, sel ast.SelectionSet, v *models.CommentEdge) graphql.Marshaler {
2420 if v == nil {
2421 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
2422 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
2423 }
2424 return graphql.Null
2425 }
2426 return ec._CommentEdge(ctx, sel, v)
2427}
2428
2429func (ec *executionContext) unmarshalNStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋcommonᚐStatus(ctx context.Context, v interface{}) (common.Status, error) {
2430 var res common.Status
2431 err := res.UnmarshalGQL(v)
2432 return res, graphql.ErrorOnPath(ctx, err)
2433}
2434
2435func (ec *executionContext) marshalNStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋcommonᚐStatus(ctx context.Context, sel ast.SelectionSet, v common.Status) graphql.Marshaler {
2436 return v
2437}
2438
2439func (ec *executionContext) marshalOBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx context.Context, sel ast.SelectionSet, v models.BugWrapper) graphql.Marshaler {
2440 if v == nil {
2441 return graphql.Null
2442 }
2443 return ec._Bug(ctx, sel, v)
2444}
2445
2446// endregion ***************************** type.gotpl *****************************