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/git-bug/git-bug/api/graphql/models"
16 "github.com/git-bug/git-bug/entities/common"
17 "github.com/git-bug/git-bug/entity"
18 "github.com/vektah/gqlparser/v2/ast"
19)
20
21// region ************************** generated!.gotpl **************************
22
23type BugResolver interface {
24 HumanID(ctx context.Context, obj models.BugWrapper) (string, error)
25
26 Actors(ctx context.Context, obj models.BugWrapper, after *string, before *string, first *int, last *int) (*models.IdentityConnection, error)
27 Participants(ctx context.Context, obj models.BugWrapper, after *string, before *string, first *int, last *int) (*models.IdentityConnection, error)
28 Comments(ctx context.Context, obj models.BugWrapper, after *string, before *string, first *int, last *int) (*models.BugCommentConnection, error)
29 Timeline(ctx context.Context, obj models.BugWrapper, after *string, before *string, first *int, last *int) (*models.BugTimelineItemConnection, error)
30 Operations(ctx context.Context, obj models.BugWrapper, after *string, before *string, first *int, last *int) (*models.OperationConnection, error)
31}
32
33// endregion ************************** generated!.gotpl **************************
34
35// region ***************************** args.gotpl *****************************
36
37func (ec *executionContext) field_Bug_actors_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
38 var err error
39 args := map[string]interface{}{}
40 var arg0 *string
41 if tmp, ok := rawArgs["after"]; ok {
42 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("after"))
43 arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
44 if err != nil {
45 return nil, err
46 }
47 }
48 args["after"] = arg0
49 var arg1 *string
50 if tmp, ok := rawArgs["before"]; ok {
51 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("before"))
52 arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
53 if err != nil {
54 return nil, err
55 }
56 }
57 args["before"] = arg1
58 var arg2 *int
59 if tmp, ok := rawArgs["first"]; ok {
60 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("first"))
61 arg2, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
62 if err != nil {
63 return nil, err
64 }
65 }
66 args["first"] = arg2
67 var arg3 *int
68 if tmp, ok := rawArgs["last"]; ok {
69 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("last"))
70 arg3, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
71 if err != nil {
72 return nil, err
73 }
74 }
75 args["last"] = arg3
76 return args, nil
77}
78
79func (ec *executionContext) field_Bug_comments_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
80 var err error
81 args := map[string]interface{}{}
82 var arg0 *string
83 if tmp, ok := rawArgs["after"]; ok {
84 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("after"))
85 arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
86 if err != nil {
87 return nil, err
88 }
89 }
90 args["after"] = arg0
91 var arg1 *string
92 if tmp, ok := rawArgs["before"]; ok {
93 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("before"))
94 arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
95 if err != nil {
96 return nil, err
97 }
98 }
99 args["before"] = arg1
100 var arg2 *int
101 if tmp, ok := rawArgs["first"]; ok {
102 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("first"))
103 arg2, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
104 if err != nil {
105 return nil, err
106 }
107 }
108 args["first"] = arg2
109 var arg3 *int
110 if tmp, ok := rawArgs["last"]; ok {
111 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("last"))
112 arg3, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
113 if err != nil {
114 return nil, err
115 }
116 }
117 args["last"] = arg3
118 return args, nil
119}
120
121func (ec *executionContext) field_Bug_operations_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
122 var err error
123 args := map[string]interface{}{}
124 var arg0 *string
125 if tmp, ok := rawArgs["after"]; ok {
126 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("after"))
127 arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
128 if err != nil {
129 return nil, err
130 }
131 }
132 args["after"] = arg0
133 var arg1 *string
134 if tmp, ok := rawArgs["before"]; ok {
135 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("before"))
136 arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
137 if err != nil {
138 return nil, err
139 }
140 }
141 args["before"] = arg1
142 var arg2 *int
143 if tmp, ok := rawArgs["first"]; ok {
144 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("first"))
145 arg2, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
146 if err != nil {
147 return nil, err
148 }
149 }
150 args["first"] = arg2
151 var arg3 *int
152 if tmp, ok := rawArgs["last"]; ok {
153 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("last"))
154 arg3, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
155 if err != nil {
156 return nil, err
157 }
158 }
159 args["last"] = arg3
160 return args, nil
161}
162
163func (ec *executionContext) field_Bug_participants_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
164 var err error
165 args := map[string]interface{}{}
166 var arg0 *string
167 if tmp, ok := rawArgs["after"]; ok {
168 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("after"))
169 arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
170 if err != nil {
171 return nil, err
172 }
173 }
174 args["after"] = arg0
175 var arg1 *string
176 if tmp, ok := rawArgs["before"]; ok {
177 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("before"))
178 arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
179 if err != nil {
180 return nil, err
181 }
182 }
183 args["before"] = arg1
184 var arg2 *int
185 if tmp, ok := rawArgs["first"]; ok {
186 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("first"))
187 arg2, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
188 if err != nil {
189 return nil, err
190 }
191 }
192 args["first"] = arg2
193 var arg3 *int
194 if tmp, ok := rawArgs["last"]; ok {
195 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("last"))
196 arg3, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
197 if err != nil {
198 return nil, err
199 }
200 }
201 args["last"] = arg3
202 return args, nil
203}
204
205func (ec *executionContext) field_Bug_timeline_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
206 var err error
207 args := map[string]interface{}{}
208 var arg0 *string
209 if tmp, ok := rawArgs["after"]; ok {
210 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("after"))
211 arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
212 if err != nil {
213 return nil, err
214 }
215 }
216 args["after"] = arg0
217 var arg1 *string
218 if tmp, ok := rawArgs["before"]; ok {
219 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("before"))
220 arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
221 if err != nil {
222 return nil, err
223 }
224 }
225 args["before"] = arg1
226 var arg2 *int
227 if tmp, ok := rawArgs["first"]; ok {
228 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("first"))
229 arg2, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
230 if err != nil {
231 return nil, err
232 }
233 }
234 args["first"] = arg2
235 var arg3 *int
236 if tmp, ok := rawArgs["last"]; ok {
237 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("last"))
238 arg3, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
239 if err != nil {
240 return nil, err
241 }
242 }
243 args["last"] = arg3
244 return args, nil
245}
246
247// endregion ***************************** args.gotpl *****************************
248
249// region ************************** directives.gotpl **************************
250
251// endregion ************************** directives.gotpl **************************
252
253// region **************************** field.gotpl *****************************
254
255func (ec *executionContext) _Bug_id(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
256 fc, err := ec.fieldContext_Bug_id(ctx, field)
257 if err != nil {
258 return graphql.Null
259 }
260 ctx = graphql.WithFieldContext(ctx, fc)
261 defer func() {
262 if r := recover(); r != nil {
263 ec.Error(ctx, ec.Recover(ctx, r))
264 ret = graphql.Null
265 }
266 }()
267 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
268 ctx = rctx // use context from middleware stack in children
269 return obj.Id(), nil
270 })
271 if err != nil {
272 ec.Error(ctx, err)
273 return graphql.Null
274 }
275 if resTmp == nil {
276 if !graphql.HasFieldError(ctx, fc) {
277 ec.Errorf(ctx, "must not be null")
278 }
279 return graphql.Null
280 }
281 res := resTmp.(entity.Id)
282 fc.Result = res
283 return ec.marshalNID2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐId(ctx, field.Selections, res)
284}
285
286func (ec *executionContext) fieldContext_Bug_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
287 fc = &graphql.FieldContext{
288 Object: "Bug",
289 Field: field,
290 IsMethod: true,
291 IsResolver: false,
292 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
293 return nil, errors.New("field of type ID does not have child fields")
294 },
295 }
296 return fc, nil
297}
298
299func (ec *executionContext) _Bug_humanId(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
300 fc, err := ec.fieldContext_Bug_humanId(ctx, field)
301 if err != nil {
302 return graphql.Null
303 }
304 ctx = graphql.WithFieldContext(ctx, fc)
305 defer func() {
306 if r := recover(); r != nil {
307 ec.Error(ctx, ec.Recover(ctx, r))
308 ret = graphql.Null
309 }
310 }()
311 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
312 ctx = rctx // use context from middleware stack in children
313 return ec.resolvers.Bug().HumanID(rctx, obj)
314 })
315 if err != nil {
316 ec.Error(ctx, err)
317 return graphql.Null
318 }
319 if resTmp == nil {
320 if !graphql.HasFieldError(ctx, fc) {
321 ec.Errorf(ctx, "must not be null")
322 }
323 return graphql.Null
324 }
325 res := resTmp.(string)
326 fc.Result = res
327 return ec.marshalNString2string(ctx, field.Selections, res)
328}
329
330func (ec *executionContext) fieldContext_Bug_humanId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
331 fc = &graphql.FieldContext{
332 Object: "Bug",
333 Field: field,
334 IsMethod: true,
335 IsResolver: true,
336 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
337 return nil, errors.New("field of type String does not have child fields")
338 },
339 }
340 return fc, nil
341}
342
343func (ec *executionContext) _Bug_status(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
344 fc, err := ec.fieldContext_Bug_status(ctx, field)
345 if err != nil {
346 return graphql.Null
347 }
348 ctx = graphql.WithFieldContext(ctx, fc)
349 defer func() {
350 if r := recover(); r != nil {
351 ec.Error(ctx, ec.Recover(ctx, r))
352 ret = graphql.Null
353 }
354 }()
355 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
356 ctx = rctx // use context from middleware stack in children
357 return obj.Status(), nil
358 })
359 if err != nil {
360 ec.Error(ctx, err)
361 return graphql.Null
362 }
363 if resTmp == nil {
364 if !graphql.HasFieldError(ctx, fc) {
365 ec.Errorf(ctx, "must not be null")
366 }
367 return graphql.Null
368 }
369 res := resTmp.(common.Status)
370 fc.Result = res
371 return ec.marshalNStatus2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋcommonᚐStatus(ctx, field.Selections, res)
372}
373
374func (ec *executionContext) fieldContext_Bug_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
375 fc = &graphql.FieldContext{
376 Object: "Bug",
377 Field: field,
378 IsMethod: true,
379 IsResolver: false,
380 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
381 return nil, errors.New("field of type Status does not have child fields")
382 },
383 }
384 return fc, nil
385}
386
387func (ec *executionContext) _Bug_title(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
388 fc, err := ec.fieldContext_Bug_title(ctx, field)
389 if err != nil {
390 return graphql.Null
391 }
392 ctx = graphql.WithFieldContext(ctx, fc)
393 defer func() {
394 if r := recover(); r != nil {
395 ec.Error(ctx, ec.Recover(ctx, r))
396 ret = graphql.Null
397 }
398 }()
399 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
400 ctx = rctx // use context from middleware stack in children
401 return obj.Title(), nil
402 })
403 if err != nil {
404 ec.Error(ctx, err)
405 return graphql.Null
406 }
407 if resTmp == nil {
408 if !graphql.HasFieldError(ctx, fc) {
409 ec.Errorf(ctx, "must not be null")
410 }
411 return graphql.Null
412 }
413 res := resTmp.(string)
414 fc.Result = res
415 return ec.marshalNString2string(ctx, field.Selections, res)
416}
417
418func (ec *executionContext) fieldContext_Bug_title(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
419 fc = &graphql.FieldContext{
420 Object: "Bug",
421 Field: field,
422 IsMethod: true,
423 IsResolver: false,
424 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
425 return nil, errors.New("field of type String does not have child fields")
426 },
427 }
428 return fc, nil
429}
430
431func (ec *executionContext) _Bug_labels(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
432 fc, err := ec.fieldContext_Bug_labels(ctx, field)
433 if err != nil {
434 return graphql.Null
435 }
436 ctx = graphql.WithFieldContext(ctx, fc)
437 defer func() {
438 if r := recover(); r != nil {
439 ec.Error(ctx, ec.Recover(ctx, r))
440 ret = graphql.Null
441 }
442 }()
443 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
444 ctx = rctx // use context from middleware stack in children
445 return obj.Labels(), nil
446 })
447 if err != nil {
448 ec.Error(ctx, err)
449 return graphql.Null
450 }
451 if resTmp == nil {
452 if !graphql.HasFieldError(ctx, fc) {
453 ec.Errorf(ctx, "must not be null")
454 }
455 return graphql.Null
456 }
457 res := resTmp.([]common.Label)
458 fc.Result = res
459 return ec.marshalNLabel2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋcommonᚐLabelᚄ(ctx, field.Selections, res)
460}
461
462func (ec *executionContext) fieldContext_Bug_labels(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
463 fc = &graphql.FieldContext{
464 Object: "Bug",
465 Field: field,
466 IsMethod: true,
467 IsResolver: false,
468 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
469 switch field.Name {
470 case "name":
471 return ec.fieldContext_Label_name(ctx, field)
472 case "color":
473 return ec.fieldContext_Label_color(ctx, field)
474 }
475 return nil, fmt.Errorf("no field named %q was found under type Label", field.Name)
476 },
477 }
478 return fc, nil
479}
480
481func (ec *executionContext) _Bug_author(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
482 fc, err := ec.fieldContext_Bug_author(ctx, field)
483 if err != nil {
484 return graphql.Null
485 }
486 ctx = graphql.WithFieldContext(ctx, fc)
487 defer func() {
488 if r := recover(); r != nil {
489 ec.Error(ctx, ec.Recover(ctx, r))
490 ret = graphql.Null
491 }
492 }()
493 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
494 ctx = rctx // use context from middleware stack in children
495 return obj.Author()
496 })
497 if err != nil {
498 ec.Error(ctx, err)
499 return graphql.Null
500 }
501 if resTmp == nil {
502 if !graphql.HasFieldError(ctx, fc) {
503 ec.Errorf(ctx, "must not be null")
504 }
505 return graphql.Null
506 }
507 res := resTmp.(models.IdentityWrapper)
508 fc.Result = res
509 return ec.marshalNIdentity2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
510}
511
512func (ec *executionContext) fieldContext_Bug_author(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
513 fc = &graphql.FieldContext{
514 Object: "Bug",
515 Field: field,
516 IsMethod: true,
517 IsResolver: false,
518 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
519 switch field.Name {
520 case "id":
521 return ec.fieldContext_Identity_id(ctx, field)
522 case "humanId":
523 return ec.fieldContext_Identity_humanId(ctx, field)
524 case "name":
525 return ec.fieldContext_Identity_name(ctx, field)
526 case "email":
527 return ec.fieldContext_Identity_email(ctx, field)
528 case "login":
529 return ec.fieldContext_Identity_login(ctx, field)
530 case "displayName":
531 return ec.fieldContext_Identity_displayName(ctx, field)
532 case "avatarUrl":
533 return ec.fieldContext_Identity_avatarUrl(ctx, field)
534 case "isProtected":
535 return ec.fieldContext_Identity_isProtected(ctx, field)
536 }
537 return nil, fmt.Errorf("no field named %q was found under type Identity", field.Name)
538 },
539 }
540 return fc, nil
541}
542
543func (ec *executionContext) _Bug_createdAt(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
544 fc, err := ec.fieldContext_Bug_createdAt(ctx, field)
545 if err != nil {
546 return graphql.Null
547 }
548 ctx = graphql.WithFieldContext(ctx, fc)
549 defer func() {
550 if r := recover(); r != nil {
551 ec.Error(ctx, ec.Recover(ctx, r))
552 ret = graphql.Null
553 }
554 }()
555 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
556 ctx = rctx // use context from middleware stack in children
557 return obj.CreatedAt(), nil
558 })
559 if err != nil {
560 ec.Error(ctx, err)
561 return graphql.Null
562 }
563 if resTmp == nil {
564 if !graphql.HasFieldError(ctx, fc) {
565 ec.Errorf(ctx, "must not be null")
566 }
567 return graphql.Null
568 }
569 res := resTmp.(time.Time)
570 fc.Result = res
571 return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
572}
573
574func (ec *executionContext) fieldContext_Bug_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
575 fc = &graphql.FieldContext{
576 Object: "Bug",
577 Field: field,
578 IsMethod: true,
579 IsResolver: false,
580 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
581 return nil, errors.New("field of type Time does not have child fields")
582 },
583 }
584 return fc, nil
585}
586
587func (ec *executionContext) _Bug_lastEdit(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
588 fc, err := ec.fieldContext_Bug_lastEdit(ctx, field)
589 if err != nil {
590 return graphql.Null
591 }
592 ctx = graphql.WithFieldContext(ctx, fc)
593 defer func() {
594 if r := recover(); r != nil {
595 ec.Error(ctx, ec.Recover(ctx, r))
596 ret = graphql.Null
597 }
598 }()
599 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
600 ctx = rctx // use context from middleware stack in children
601 return obj.LastEdit(), nil
602 })
603 if err != nil {
604 ec.Error(ctx, err)
605 return graphql.Null
606 }
607 if resTmp == nil {
608 if !graphql.HasFieldError(ctx, fc) {
609 ec.Errorf(ctx, "must not be null")
610 }
611 return graphql.Null
612 }
613 res := resTmp.(time.Time)
614 fc.Result = res
615 return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
616}
617
618func (ec *executionContext) fieldContext_Bug_lastEdit(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
619 fc = &graphql.FieldContext{
620 Object: "Bug",
621 Field: field,
622 IsMethod: true,
623 IsResolver: false,
624 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
625 return nil, errors.New("field of type Time does not have child fields")
626 },
627 }
628 return fc, nil
629}
630
631func (ec *executionContext) _Bug_actors(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
632 fc, err := ec.fieldContext_Bug_actors(ctx, field)
633 if err != nil {
634 return graphql.Null
635 }
636 ctx = graphql.WithFieldContext(ctx, fc)
637 defer func() {
638 if r := recover(); r != nil {
639 ec.Error(ctx, ec.Recover(ctx, r))
640 ret = graphql.Null
641 }
642 }()
643 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
644 ctx = rctx // use context from middleware stack in children
645 return ec.resolvers.Bug().Actors(rctx, obj, fc.Args["after"].(*string), fc.Args["before"].(*string), fc.Args["first"].(*int), fc.Args["last"].(*int))
646 })
647 if err != nil {
648 ec.Error(ctx, err)
649 return graphql.Null
650 }
651 if resTmp == nil {
652 if !graphql.HasFieldError(ctx, fc) {
653 ec.Errorf(ctx, "must not be null")
654 }
655 return graphql.Null
656 }
657 res := resTmp.(*models.IdentityConnection)
658 fc.Result = res
659 return ec.marshalNIdentityConnection2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityConnection(ctx, field.Selections, res)
660}
661
662func (ec *executionContext) fieldContext_Bug_actors(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
663 fc = &graphql.FieldContext{
664 Object: "Bug",
665 Field: field,
666 IsMethod: true,
667 IsResolver: true,
668 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
669 switch field.Name {
670 case "edges":
671 return ec.fieldContext_IdentityConnection_edges(ctx, field)
672 case "nodes":
673 return ec.fieldContext_IdentityConnection_nodes(ctx, field)
674 case "pageInfo":
675 return ec.fieldContext_IdentityConnection_pageInfo(ctx, field)
676 case "totalCount":
677 return ec.fieldContext_IdentityConnection_totalCount(ctx, field)
678 }
679 return nil, fmt.Errorf("no field named %q was found under type IdentityConnection", field.Name)
680 },
681 }
682 defer func() {
683 if r := recover(); r != nil {
684 err = ec.Recover(ctx, r)
685 ec.Error(ctx, err)
686 }
687 }()
688 ctx = graphql.WithFieldContext(ctx, fc)
689 if fc.Args, err = ec.field_Bug_actors_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
690 ec.Error(ctx, err)
691 return fc, err
692 }
693 return fc, nil
694}
695
696func (ec *executionContext) _Bug_participants(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
697 fc, err := ec.fieldContext_Bug_participants(ctx, field)
698 if err != nil {
699 return graphql.Null
700 }
701 ctx = graphql.WithFieldContext(ctx, fc)
702 defer func() {
703 if r := recover(); r != nil {
704 ec.Error(ctx, ec.Recover(ctx, r))
705 ret = graphql.Null
706 }
707 }()
708 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
709 ctx = rctx // use context from middleware stack in children
710 return ec.resolvers.Bug().Participants(rctx, obj, fc.Args["after"].(*string), fc.Args["before"].(*string), fc.Args["first"].(*int), fc.Args["last"].(*int))
711 })
712 if err != nil {
713 ec.Error(ctx, err)
714 return graphql.Null
715 }
716 if resTmp == nil {
717 if !graphql.HasFieldError(ctx, fc) {
718 ec.Errorf(ctx, "must not be null")
719 }
720 return graphql.Null
721 }
722 res := resTmp.(*models.IdentityConnection)
723 fc.Result = res
724 return ec.marshalNIdentityConnection2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityConnection(ctx, field.Selections, res)
725}
726
727func (ec *executionContext) fieldContext_Bug_participants(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
728 fc = &graphql.FieldContext{
729 Object: "Bug",
730 Field: field,
731 IsMethod: true,
732 IsResolver: true,
733 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
734 switch field.Name {
735 case "edges":
736 return ec.fieldContext_IdentityConnection_edges(ctx, field)
737 case "nodes":
738 return ec.fieldContext_IdentityConnection_nodes(ctx, field)
739 case "pageInfo":
740 return ec.fieldContext_IdentityConnection_pageInfo(ctx, field)
741 case "totalCount":
742 return ec.fieldContext_IdentityConnection_totalCount(ctx, field)
743 }
744 return nil, fmt.Errorf("no field named %q was found under type IdentityConnection", field.Name)
745 },
746 }
747 defer func() {
748 if r := recover(); r != nil {
749 err = ec.Recover(ctx, r)
750 ec.Error(ctx, err)
751 }
752 }()
753 ctx = graphql.WithFieldContext(ctx, fc)
754 if fc.Args, err = ec.field_Bug_participants_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
755 ec.Error(ctx, err)
756 return fc, err
757 }
758 return fc, nil
759}
760
761func (ec *executionContext) _Bug_comments(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
762 fc, err := ec.fieldContext_Bug_comments(ctx, field)
763 if err != nil {
764 return graphql.Null
765 }
766 ctx = graphql.WithFieldContext(ctx, fc)
767 defer func() {
768 if r := recover(); r != nil {
769 ec.Error(ctx, ec.Recover(ctx, r))
770 ret = graphql.Null
771 }
772 }()
773 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
774 ctx = rctx // use context from middleware stack in children
775 return ec.resolvers.Bug().Comments(rctx, obj, fc.Args["after"].(*string), fc.Args["before"].(*string), fc.Args["first"].(*int), fc.Args["last"].(*int))
776 })
777 if err != nil {
778 ec.Error(ctx, err)
779 return graphql.Null
780 }
781 if resTmp == nil {
782 if !graphql.HasFieldError(ctx, fc) {
783 ec.Errorf(ctx, "must not be null")
784 }
785 return graphql.Null
786 }
787 res := resTmp.(*models.BugCommentConnection)
788 fc.Result = res
789 return ec.marshalNBugCommentConnection2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugCommentConnection(ctx, field.Selections, res)
790}
791
792func (ec *executionContext) fieldContext_Bug_comments(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
793 fc = &graphql.FieldContext{
794 Object: "Bug",
795 Field: field,
796 IsMethod: true,
797 IsResolver: true,
798 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
799 switch field.Name {
800 case "edges":
801 return ec.fieldContext_BugCommentConnection_edges(ctx, field)
802 case "nodes":
803 return ec.fieldContext_BugCommentConnection_nodes(ctx, field)
804 case "pageInfo":
805 return ec.fieldContext_BugCommentConnection_pageInfo(ctx, field)
806 case "totalCount":
807 return ec.fieldContext_BugCommentConnection_totalCount(ctx, field)
808 }
809 return nil, fmt.Errorf("no field named %q was found under type BugCommentConnection", field.Name)
810 },
811 }
812 defer func() {
813 if r := recover(); r != nil {
814 err = ec.Recover(ctx, r)
815 ec.Error(ctx, err)
816 }
817 }()
818 ctx = graphql.WithFieldContext(ctx, fc)
819 if fc.Args, err = ec.field_Bug_comments_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
820 ec.Error(ctx, err)
821 return fc, err
822 }
823 return fc, nil
824}
825
826func (ec *executionContext) _Bug_timeline(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
827 fc, err := ec.fieldContext_Bug_timeline(ctx, field)
828 if err != nil {
829 return graphql.Null
830 }
831 ctx = graphql.WithFieldContext(ctx, fc)
832 defer func() {
833 if r := recover(); r != nil {
834 ec.Error(ctx, ec.Recover(ctx, r))
835 ret = graphql.Null
836 }
837 }()
838 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
839 ctx = rctx // use context from middleware stack in children
840 return ec.resolvers.Bug().Timeline(rctx, obj, fc.Args["after"].(*string), fc.Args["before"].(*string), fc.Args["first"].(*int), fc.Args["last"].(*int))
841 })
842 if err != nil {
843 ec.Error(ctx, err)
844 return graphql.Null
845 }
846 if resTmp == nil {
847 if !graphql.HasFieldError(ctx, fc) {
848 ec.Errorf(ctx, "must not be null")
849 }
850 return graphql.Null
851 }
852 res := resTmp.(*models.BugTimelineItemConnection)
853 fc.Result = res
854 return ec.marshalNBugTimelineItemConnection2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugTimelineItemConnection(ctx, field.Selections, res)
855}
856
857func (ec *executionContext) fieldContext_Bug_timeline(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
858 fc = &graphql.FieldContext{
859 Object: "Bug",
860 Field: field,
861 IsMethod: true,
862 IsResolver: true,
863 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
864 switch field.Name {
865 case "edges":
866 return ec.fieldContext_BugTimelineItemConnection_edges(ctx, field)
867 case "nodes":
868 return ec.fieldContext_BugTimelineItemConnection_nodes(ctx, field)
869 case "pageInfo":
870 return ec.fieldContext_BugTimelineItemConnection_pageInfo(ctx, field)
871 case "totalCount":
872 return ec.fieldContext_BugTimelineItemConnection_totalCount(ctx, field)
873 }
874 return nil, fmt.Errorf("no field named %q was found under type BugTimelineItemConnection", field.Name)
875 },
876 }
877 defer func() {
878 if r := recover(); r != nil {
879 err = ec.Recover(ctx, r)
880 ec.Error(ctx, err)
881 }
882 }()
883 ctx = graphql.WithFieldContext(ctx, fc)
884 if fc.Args, err = ec.field_Bug_timeline_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
885 ec.Error(ctx, err)
886 return fc, err
887 }
888 return fc, nil
889}
890
891func (ec *executionContext) _Bug_operations(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
892 fc, err := ec.fieldContext_Bug_operations(ctx, field)
893 if err != nil {
894 return graphql.Null
895 }
896 ctx = graphql.WithFieldContext(ctx, fc)
897 defer func() {
898 if r := recover(); r != nil {
899 ec.Error(ctx, ec.Recover(ctx, r))
900 ret = graphql.Null
901 }
902 }()
903 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
904 ctx = rctx // use context from middleware stack in children
905 return ec.resolvers.Bug().Operations(rctx, obj, fc.Args["after"].(*string), fc.Args["before"].(*string), fc.Args["first"].(*int), fc.Args["last"].(*int))
906 })
907 if err != nil {
908 ec.Error(ctx, err)
909 return graphql.Null
910 }
911 if resTmp == nil {
912 if !graphql.HasFieldError(ctx, fc) {
913 ec.Errorf(ctx, "must not be null")
914 }
915 return graphql.Null
916 }
917 res := resTmp.(*models.OperationConnection)
918 fc.Result = res
919 return ec.marshalNOperationConnection2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOperationConnection(ctx, field.Selections, res)
920}
921
922func (ec *executionContext) fieldContext_Bug_operations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
923 fc = &graphql.FieldContext{
924 Object: "Bug",
925 Field: field,
926 IsMethod: true,
927 IsResolver: true,
928 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
929 switch field.Name {
930 case "edges":
931 return ec.fieldContext_OperationConnection_edges(ctx, field)
932 case "nodes":
933 return ec.fieldContext_OperationConnection_nodes(ctx, field)
934 case "pageInfo":
935 return ec.fieldContext_OperationConnection_pageInfo(ctx, field)
936 case "totalCount":
937 return ec.fieldContext_OperationConnection_totalCount(ctx, field)
938 }
939 return nil, fmt.Errorf("no field named %q was found under type OperationConnection", field.Name)
940 },
941 }
942 defer func() {
943 if r := recover(); r != nil {
944 err = ec.Recover(ctx, r)
945 ec.Error(ctx, err)
946 }
947 }()
948 ctx = graphql.WithFieldContext(ctx, fc)
949 if fc.Args, err = ec.field_Bug_operations_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
950 ec.Error(ctx, err)
951 return fc, err
952 }
953 return fc, nil
954}
955
956func (ec *executionContext) _BugConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) (ret graphql.Marshaler) {
957 fc, err := ec.fieldContext_BugConnection_edges(ctx, field)
958 if err != nil {
959 return graphql.Null
960 }
961 ctx = graphql.WithFieldContext(ctx, fc)
962 defer func() {
963 if r := recover(); r != nil {
964 ec.Error(ctx, ec.Recover(ctx, r))
965 ret = graphql.Null
966 }
967 }()
968 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
969 ctx = rctx // use context from middleware stack in children
970 return obj.Edges, nil
971 })
972 if err != nil {
973 ec.Error(ctx, err)
974 return graphql.Null
975 }
976 if resTmp == nil {
977 if !graphql.HasFieldError(ctx, fc) {
978 ec.Errorf(ctx, "must not be null")
979 }
980 return graphql.Null
981 }
982 res := resTmp.([]*models.BugEdge)
983 fc.Result = res
984 return ec.marshalNBugEdge2ᚕᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugEdgeᚄ(ctx, field.Selections, res)
985}
986
987func (ec *executionContext) fieldContext_BugConnection_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
988 fc = &graphql.FieldContext{
989 Object: "BugConnection",
990 Field: field,
991 IsMethod: false,
992 IsResolver: false,
993 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
994 switch field.Name {
995 case "cursor":
996 return ec.fieldContext_BugEdge_cursor(ctx, field)
997 case "node":
998 return ec.fieldContext_BugEdge_node(ctx, field)
999 }
1000 return nil, fmt.Errorf("no field named %q was found under type BugEdge", field.Name)
1001 },
1002 }
1003 return fc, nil
1004}
1005
1006func (ec *executionContext) _BugConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) (ret graphql.Marshaler) {
1007 fc, err := ec.fieldContext_BugConnection_nodes(ctx, field)
1008 if err != nil {
1009 return graphql.Null
1010 }
1011 ctx = graphql.WithFieldContext(ctx, fc)
1012 defer func() {
1013 if r := recover(); r != nil {
1014 ec.Error(ctx, ec.Recover(ctx, r))
1015 ret = graphql.Null
1016 }
1017 }()
1018 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1019 ctx = rctx // use context from middleware stack in children
1020 return obj.Nodes, nil
1021 })
1022 if err != nil {
1023 ec.Error(ctx, err)
1024 return graphql.Null
1025 }
1026 if resTmp == nil {
1027 if !graphql.HasFieldError(ctx, fc) {
1028 ec.Errorf(ctx, "must not be null")
1029 }
1030 return graphql.Null
1031 }
1032 res := resTmp.([]models.BugWrapper)
1033 fc.Result = res
1034 return ec.marshalNBug2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapperᚄ(ctx, field.Selections, res)
1035}
1036
1037func (ec *executionContext) fieldContext_BugConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1038 fc = &graphql.FieldContext{
1039 Object: "BugConnection",
1040 Field: field,
1041 IsMethod: false,
1042 IsResolver: false,
1043 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1044 switch field.Name {
1045 case "id":
1046 return ec.fieldContext_Bug_id(ctx, field)
1047 case "humanId":
1048 return ec.fieldContext_Bug_humanId(ctx, field)
1049 case "status":
1050 return ec.fieldContext_Bug_status(ctx, field)
1051 case "title":
1052 return ec.fieldContext_Bug_title(ctx, field)
1053 case "labels":
1054 return ec.fieldContext_Bug_labels(ctx, field)
1055 case "author":
1056 return ec.fieldContext_Bug_author(ctx, field)
1057 case "createdAt":
1058 return ec.fieldContext_Bug_createdAt(ctx, field)
1059 case "lastEdit":
1060 return ec.fieldContext_Bug_lastEdit(ctx, field)
1061 case "actors":
1062 return ec.fieldContext_Bug_actors(ctx, field)
1063 case "participants":
1064 return ec.fieldContext_Bug_participants(ctx, field)
1065 case "comments":
1066 return ec.fieldContext_Bug_comments(ctx, field)
1067 case "timeline":
1068 return ec.fieldContext_Bug_timeline(ctx, field)
1069 case "operations":
1070 return ec.fieldContext_Bug_operations(ctx, field)
1071 }
1072 return nil, fmt.Errorf("no field named %q was found under type Bug", field.Name)
1073 },
1074 }
1075 return fc, nil
1076}
1077
1078func (ec *executionContext) _BugConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) (ret graphql.Marshaler) {
1079 fc, err := ec.fieldContext_BugConnection_pageInfo(ctx, field)
1080 if err != nil {
1081 return graphql.Null
1082 }
1083 ctx = graphql.WithFieldContext(ctx, fc)
1084 defer func() {
1085 if r := recover(); r != nil {
1086 ec.Error(ctx, ec.Recover(ctx, r))
1087 ret = graphql.Null
1088 }
1089 }()
1090 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1091 ctx = rctx // use context from middleware stack in children
1092 return obj.PageInfo, nil
1093 })
1094 if err != nil {
1095 ec.Error(ctx, err)
1096 return graphql.Null
1097 }
1098 if resTmp == nil {
1099 if !graphql.HasFieldError(ctx, fc) {
1100 ec.Errorf(ctx, "must not be null")
1101 }
1102 return graphql.Null
1103 }
1104 res := resTmp.(*models.PageInfo)
1105 fc.Result = res
1106 return ec.marshalNPageInfo2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res)
1107}
1108
1109func (ec *executionContext) fieldContext_BugConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1110 fc = &graphql.FieldContext{
1111 Object: "BugConnection",
1112 Field: field,
1113 IsMethod: false,
1114 IsResolver: false,
1115 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1116 switch field.Name {
1117 case "hasNextPage":
1118 return ec.fieldContext_PageInfo_hasNextPage(ctx, field)
1119 case "hasPreviousPage":
1120 return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field)
1121 case "startCursor":
1122 return ec.fieldContext_PageInfo_startCursor(ctx, field)
1123 case "endCursor":
1124 return ec.fieldContext_PageInfo_endCursor(ctx, field)
1125 }
1126 return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name)
1127 },
1128 }
1129 return fc, nil
1130}
1131
1132func (ec *executionContext) _BugConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) (ret graphql.Marshaler) {
1133 fc, err := ec.fieldContext_BugConnection_totalCount(ctx, field)
1134 if err != nil {
1135 return graphql.Null
1136 }
1137 ctx = graphql.WithFieldContext(ctx, fc)
1138 defer func() {
1139 if r := recover(); r != nil {
1140 ec.Error(ctx, ec.Recover(ctx, r))
1141 ret = graphql.Null
1142 }
1143 }()
1144 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1145 ctx = rctx // use context from middleware stack in children
1146 return obj.TotalCount, nil
1147 })
1148 if err != nil {
1149 ec.Error(ctx, err)
1150 return graphql.Null
1151 }
1152 if resTmp == nil {
1153 if !graphql.HasFieldError(ctx, fc) {
1154 ec.Errorf(ctx, "must not be null")
1155 }
1156 return graphql.Null
1157 }
1158 res := resTmp.(int)
1159 fc.Result = res
1160 return ec.marshalNInt2int(ctx, field.Selections, res)
1161}
1162
1163func (ec *executionContext) fieldContext_BugConnection_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1164 fc = &graphql.FieldContext{
1165 Object: "BugConnection",
1166 Field: field,
1167 IsMethod: false,
1168 IsResolver: false,
1169 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1170 return nil, errors.New("field of type Int does not have child fields")
1171 },
1172 }
1173 return fc, nil
1174}
1175
1176func (ec *executionContext) _BugEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.BugEdge) (ret graphql.Marshaler) {
1177 fc, err := ec.fieldContext_BugEdge_cursor(ctx, field)
1178 if err != nil {
1179 return graphql.Null
1180 }
1181 ctx = graphql.WithFieldContext(ctx, fc)
1182 defer func() {
1183 if r := recover(); r != nil {
1184 ec.Error(ctx, ec.Recover(ctx, r))
1185 ret = graphql.Null
1186 }
1187 }()
1188 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1189 ctx = rctx // use context from middleware stack in children
1190 return obj.Cursor, nil
1191 })
1192 if err != nil {
1193 ec.Error(ctx, err)
1194 return graphql.Null
1195 }
1196 if resTmp == nil {
1197 if !graphql.HasFieldError(ctx, fc) {
1198 ec.Errorf(ctx, "must not be null")
1199 }
1200 return graphql.Null
1201 }
1202 res := resTmp.(string)
1203 fc.Result = res
1204 return ec.marshalNString2string(ctx, field.Selections, res)
1205}
1206
1207func (ec *executionContext) fieldContext_BugEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1208 fc = &graphql.FieldContext{
1209 Object: "BugEdge",
1210 Field: field,
1211 IsMethod: false,
1212 IsResolver: false,
1213 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1214 return nil, errors.New("field of type String does not have child fields")
1215 },
1216 }
1217 return fc, nil
1218}
1219
1220func (ec *executionContext) _BugEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.BugEdge) (ret graphql.Marshaler) {
1221 fc, err := ec.fieldContext_BugEdge_node(ctx, field)
1222 if err != nil {
1223 return graphql.Null
1224 }
1225 ctx = graphql.WithFieldContext(ctx, fc)
1226 defer func() {
1227 if r := recover(); r != nil {
1228 ec.Error(ctx, ec.Recover(ctx, r))
1229 ret = graphql.Null
1230 }
1231 }()
1232 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1233 ctx = rctx // use context from middleware stack in children
1234 return obj.Node, nil
1235 })
1236 if err != nil {
1237 ec.Error(ctx, err)
1238 return graphql.Null
1239 }
1240 if resTmp == nil {
1241 if !graphql.HasFieldError(ctx, fc) {
1242 ec.Errorf(ctx, "must not be null")
1243 }
1244 return graphql.Null
1245 }
1246 res := resTmp.(models.BugWrapper)
1247 fc.Result = res
1248 return ec.marshalNBug2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res)
1249}
1250
1251func (ec *executionContext) fieldContext_BugEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1252 fc = &graphql.FieldContext{
1253 Object: "BugEdge",
1254 Field: field,
1255 IsMethod: false,
1256 IsResolver: false,
1257 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1258 switch field.Name {
1259 case "id":
1260 return ec.fieldContext_Bug_id(ctx, field)
1261 case "humanId":
1262 return ec.fieldContext_Bug_humanId(ctx, field)
1263 case "status":
1264 return ec.fieldContext_Bug_status(ctx, field)
1265 case "title":
1266 return ec.fieldContext_Bug_title(ctx, field)
1267 case "labels":
1268 return ec.fieldContext_Bug_labels(ctx, field)
1269 case "author":
1270 return ec.fieldContext_Bug_author(ctx, field)
1271 case "createdAt":
1272 return ec.fieldContext_Bug_createdAt(ctx, field)
1273 case "lastEdit":
1274 return ec.fieldContext_Bug_lastEdit(ctx, field)
1275 case "actors":
1276 return ec.fieldContext_Bug_actors(ctx, field)
1277 case "participants":
1278 return ec.fieldContext_Bug_participants(ctx, field)
1279 case "comments":
1280 return ec.fieldContext_Bug_comments(ctx, field)
1281 case "timeline":
1282 return ec.fieldContext_Bug_timeline(ctx, field)
1283 case "operations":
1284 return ec.fieldContext_Bug_operations(ctx, field)
1285 }
1286 return nil, fmt.Errorf("no field named %q was found under type Bug", field.Name)
1287 },
1288 }
1289 return fc, nil
1290}
1291
1292// endregion **************************** field.gotpl *****************************
1293
1294// region **************************** input.gotpl *****************************
1295
1296// endregion **************************** input.gotpl *****************************
1297
1298// region ************************** interface.gotpl ***************************
1299
1300// endregion ************************** interface.gotpl ***************************
1301
1302// region **************************** object.gotpl ****************************
1303
1304var bugImplementors = []string{"Bug", "Authored"}
1305
1306func (ec *executionContext) _Bug(ctx context.Context, sel ast.SelectionSet, obj models.BugWrapper) graphql.Marshaler {
1307 fields := graphql.CollectFields(ec.OperationContext, sel, bugImplementors)
1308
1309 out := graphql.NewFieldSet(fields)
1310 deferred := make(map[string]*graphql.FieldSet)
1311 for i, field := range fields {
1312 switch field.Name {
1313 case "__typename":
1314 out.Values[i] = graphql.MarshalString("Bug")
1315 case "id":
1316 out.Values[i] = ec._Bug_id(ctx, field, obj)
1317 if out.Values[i] == graphql.Null {
1318 atomic.AddUint32(&out.Invalids, 1)
1319 }
1320 case "humanId":
1321 field := field
1322
1323 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
1324 defer func() {
1325 if r := recover(); r != nil {
1326 ec.Error(ctx, ec.Recover(ctx, r))
1327 }
1328 }()
1329 res = ec._Bug_humanId(ctx, field, obj)
1330 if res == graphql.Null {
1331 atomic.AddUint32(&fs.Invalids, 1)
1332 }
1333 return res
1334 }
1335
1336 if field.Deferrable != nil {
1337 dfs, ok := deferred[field.Deferrable.Label]
1338 di := 0
1339 if ok {
1340 dfs.AddField(field)
1341 di = len(dfs.Values) - 1
1342 } else {
1343 dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
1344 deferred[field.Deferrable.Label] = dfs
1345 }
1346 dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
1347 return innerFunc(ctx, dfs)
1348 })
1349
1350 // don't run the out.Concurrently() call below
1351 out.Values[i] = graphql.Null
1352 continue
1353 }
1354
1355 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
1356 case "status":
1357 out.Values[i] = ec._Bug_status(ctx, field, obj)
1358 if out.Values[i] == graphql.Null {
1359 atomic.AddUint32(&out.Invalids, 1)
1360 }
1361 case "title":
1362 out.Values[i] = ec._Bug_title(ctx, field, obj)
1363 if out.Values[i] == graphql.Null {
1364 atomic.AddUint32(&out.Invalids, 1)
1365 }
1366 case "labels":
1367 out.Values[i] = ec._Bug_labels(ctx, field, obj)
1368 if out.Values[i] == graphql.Null {
1369 atomic.AddUint32(&out.Invalids, 1)
1370 }
1371 case "author":
1372 out.Values[i] = ec._Bug_author(ctx, field, obj)
1373 if out.Values[i] == graphql.Null {
1374 atomic.AddUint32(&out.Invalids, 1)
1375 }
1376 case "createdAt":
1377 out.Values[i] = ec._Bug_createdAt(ctx, field, obj)
1378 if out.Values[i] == graphql.Null {
1379 atomic.AddUint32(&out.Invalids, 1)
1380 }
1381 case "lastEdit":
1382 out.Values[i] = ec._Bug_lastEdit(ctx, field, obj)
1383 if out.Values[i] == graphql.Null {
1384 atomic.AddUint32(&out.Invalids, 1)
1385 }
1386 case "actors":
1387 field := field
1388
1389 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
1390 defer func() {
1391 if r := recover(); r != nil {
1392 ec.Error(ctx, ec.Recover(ctx, r))
1393 }
1394 }()
1395 res = ec._Bug_actors(ctx, field, obj)
1396 if res == graphql.Null {
1397 atomic.AddUint32(&fs.Invalids, 1)
1398 }
1399 return res
1400 }
1401
1402 if field.Deferrable != nil {
1403 dfs, ok := deferred[field.Deferrable.Label]
1404 di := 0
1405 if ok {
1406 dfs.AddField(field)
1407 di = len(dfs.Values) - 1
1408 } else {
1409 dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
1410 deferred[field.Deferrable.Label] = dfs
1411 }
1412 dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
1413 return innerFunc(ctx, dfs)
1414 })
1415
1416 // don't run the out.Concurrently() call below
1417 out.Values[i] = graphql.Null
1418 continue
1419 }
1420
1421 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
1422 case "participants":
1423 field := field
1424
1425 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
1426 defer func() {
1427 if r := recover(); r != nil {
1428 ec.Error(ctx, ec.Recover(ctx, r))
1429 }
1430 }()
1431 res = ec._Bug_participants(ctx, field, obj)
1432 if res == graphql.Null {
1433 atomic.AddUint32(&fs.Invalids, 1)
1434 }
1435 return res
1436 }
1437
1438 if field.Deferrable != nil {
1439 dfs, ok := deferred[field.Deferrable.Label]
1440 di := 0
1441 if ok {
1442 dfs.AddField(field)
1443 di = len(dfs.Values) - 1
1444 } else {
1445 dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
1446 deferred[field.Deferrable.Label] = dfs
1447 }
1448 dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
1449 return innerFunc(ctx, dfs)
1450 })
1451
1452 // don't run the out.Concurrently() call below
1453 out.Values[i] = graphql.Null
1454 continue
1455 }
1456
1457 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
1458 case "comments":
1459 field := field
1460
1461 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
1462 defer func() {
1463 if r := recover(); r != nil {
1464 ec.Error(ctx, ec.Recover(ctx, r))
1465 }
1466 }()
1467 res = ec._Bug_comments(ctx, field, obj)
1468 if res == graphql.Null {
1469 atomic.AddUint32(&fs.Invalids, 1)
1470 }
1471 return res
1472 }
1473
1474 if field.Deferrable != nil {
1475 dfs, ok := deferred[field.Deferrable.Label]
1476 di := 0
1477 if ok {
1478 dfs.AddField(field)
1479 di = len(dfs.Values) - 1
1480 } else {
1481 dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
1482 deferred[field.Deferrable.Label] = dfs
1483 }
1484 dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
1485 return innerFunc(ctx, dfs)
1486 })
1487
1488 // don't run the out.Concurrently() call below
1489 out.Values[i] = graphql.Null
1490 continue
1491 }
1492
1493 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
1494 case "timeline":
1495 field := field
1496
1497 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
1498 defer func() {
1499 if r := recover(); r != nil {
1500 ec.Error(ctx, ec.Recover(ctx, r))
1501 }
1502 }()
1503 res = ec._Bug_timeline(ctx, field, obj)
1504 if res == graphql.Null {
1505 atomic.AddUint32(&fs.Invalids, 1)
1506 }
1507 return res
1508 }
1509
1510 if field.Deferrable != nil {
1511 dfs, ok := deferred[field.Deferrable.Label]
1512 di := 0
1513 if ok {
1514 dfs.AddField(field)
1515 di = len(dfs.Values) - 1
1516 } else {
1517 dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
1518 deferred[field.Deferrable.Label] = dfs
1519 }
1520 dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
1521 return innerFunc(ctx, dfs)
1522 })
1523
1524 // don't run the out.Concurrently() call below
1525 out.Values[i] = graphql.Null
1526 continue
1527 }
1528
1529 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
1530 case "operations":
1531 field := field
1532
1533 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
1534 defer func() {
1535 if r := recover(); r != nil {
1536 ec.Error(ctx, ec.Recover(ctx, r))
1537 }
1538 }()
1539 res = ec._Bug_operations(ctx, field, obj)
1540 if res == graphql.Null {
1541 atomic.AddUint32(&fs.Invalids, 1)
1542 }
1543 return res
1544 }
1545
1546 if field.Deferrable != nil {
1547 dfs, ok := deferred[field.Deferrable.Label]
1548 di := 0
1549 if ok {
1550 dfs.AddField(field)
1551 di = len(dfs.Values) - 1
1552 } else {
1553 dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
1554 deferred[field.Deferrable.Label] = dfs
1555 }
1556 dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
1557 return innerFunc(ctx, dfs)
1558 })
1559
1560 // don't run the out.Concurrently() call below
1561 out.Values[i] = graphql.Null
1562 continue
1563 }
1564
1565 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
1566 default:
1567 panic("unknown field " + strconv.Quote(field.Name))
1568 }
1569 }
1570 out.Dispatch(ctx)
1571 if out.Invalids > 0 {
1572 return graphql.Null
1573 }
1574
1575 atomic.AddInt32(&ec.deferred, int32(len(deferred)))
1576
1577 for label, dfs := range deferred {
1578 ec.processDeferredGroup(graphql.DeferredGroup{
1579 Label: label,
1580 Path: graphql.GetPath(ctx),
1581 FieldSet: dfs,
1582 Context: ctx,
1583 })
1584 }
1585
1586 return out
1587}
1588
1589var bugConnectionImplementors = []string{"BugConnection"}
1590
1591func (ec *executionContext) _BugConnection(ctx context.Context, sel ast.SelectionSet, obj *models.BugConnection) graphql.Marshaler {
1592 fields := graphql.CollectFields(ec.OperationContext, sel, bugConnectionImplementors)
1593
1594 out := graphql.NewFieldSet(fields)
1595 deferred := make(map[string]*graphql.FieldSet)
1596 for i, field := range fields {
1597 switch field.Name {
1598 case "__typename":
1599 out.Values[i] = graphql.MarshalString("BugConnection")
1600 case "edges":
1601 out.Values[i] = ec._BugConnection_edges(ctx, field, obj)
1602 if out.Values[i] == graphql.Null {
1603 out.Invalids++
1604 }
1605 case "nodes":
1606 out.Values[i] = ec._BugConnection_nodes(ctx, field, obj)
1607 if out.Values[i] == graphql.Null {
1608 out.Invalids++
1609 }
1610 case "pageInfo":
1611 out.Values[i] = ec._BugConnection_pageInfo(ctx, field, obj)
1612 if out.Values[i] == graphql.Null {
1613 out.Invalids++
1614 }
1615 case "totalCount":
1616 out.Values[i] = ec._BugConnection_totalCount(ctx, field, obj)
1617 if out.Values[i] == graphql.Null {
1618 out.Invalids++
1619 }
1620 default:
1621 panic("unknown field " + strconv.Quote(field.Name))
1622 }
1623 }
1624 out.Dispatch(ctx)
1625 if out.Invalids > 0 {
1626 return graphql.Null
1627 }
1628
1629 atomic.AddInt32(&ec.deferred, int32(len(deferred)))
1630
1631 for label, dfs := range deferred {
1632 ec.processDeferredGroup(graphql.DeferredGroup{
1633 Label: label,
1634 Path: graphql.GetPath(ctx),
1635 FieldSet: dfs,
1636 Context: ctx,
1637 })
1638 }
1639
1640 return out
1641}
1642
1643var bugEdgeImplementors = []string{"BugEdge"}
1644
1645func (ec *executionContext) _BugEdge(ctx context.Context, sel ast.SelectionSet, obj *models.BugEdge) graphql.Marshaler {
1646 fields := graphql.CollectFields(ec.OperationContext, sel, bugEdgeImplementors)
1647
1648 out := graphql.NewFieldSet(fields)
1649 deferred := make(map[string]*graphql.FieldSet)
1650 for i, field := range fields {
1651 switch field.Name {
1652 case "__typename":
1653 out.Values[i] = graphql.MarshalString("BugEdge")
1654 case "cursor":
1655 out.Values[i] = ec._BugEdge_cursor(ctx, field, obj)
1656 if out.Values[i] == graphql.Null {
1657 out.Invalids++
1658 }
1659 case "node":
1660 out.Values[i] = ec._BugEdge_node(ctx, field, obj)
1661 if out.Values[i] == graphql.Null {
1662 out.Invalids++
1663 }
1664 default:
1665 panic("unknown field " + strconv.Quote(field.Name))
1666 }
1667 }
1668 out.Dispatch(ctx)
1669 if out.Invalids > 0 {
1670 return graphql.Null
1671 }
1672
1673 atomic.AddInt32(&ec.deferred, int32(len(deferred)))
1674
1675 for label, dfs := range deferred {
1676 ec.processDeferredGroup(graphql.DeferredGroup{
1677 Label: label,
1678 Path: graphql.GetPath(ctx),
1679 FieldSet: dfs,
1680 Context: ctx,
1681 })
1682 }
1683
1684 return out
1685}
1686
1687// endregion **************************** object.gotpl ****************************
1688
1689// region ***************************** type.gotpl *****************************
1690
1691func (ec *executionContext) marshalNBug2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx context.Context, sel ast.SelectionSet, v models.BugWrapper) graphql.Marshaler {
1692 if v == nil {
1693 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
1694 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
1695 }
1696 return graphql.Null
1697 }
1698 return ec._Bug(ctx, sel, v)
1699}
1700
1701func (ec *executionContext) marshalNBug2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapperᚄ(ctx context.Context, sel ast.SelectionSet, v []models.BugWrapper) graphql.Marshaler {
1702 ret := make(graphql.Array, len(v))
1703 var wg sync.WaitGroup
1704 isLen1 := len(v) == 1
1705 if !isLen1 {
1706 wg.Add(len(v))
1707 }
1708 for i := range v {
1709 i := i
1710 fc := &graphql.FieldContext{
1711 Index: &i,
1712 Result: &v[i],
1713 }
1714 ctx := graphql.WithFieldContext(ctx, fc)
1715 f := func(i int) {
1716 defer func() {
1717 if r := recover(); r != nil {
1718 ec.Error(ctx, ec.Recover(ctx, r))
1719 ret = nil
1720 }
1721 }()
1722 if !isLen1 {
1723 defer wg.Done()
1724 }
1725 ret[i] = ec.marshalNBug2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, sel, v[i])
1726 }
1727 if isLen1 {
1728 f(i)
1729 } else {
1730 go f(i)
1731 }
1732
1733 }
1734 wg.Wait()
1735
1736 for _, e := range ret {
1737 if e == graphql.Null {
1738 return graphql.Null
1739 }
1740 }
1741
1742 return ret
1743}
1744
1745func (ec *executionContext) marshalNBugConnection2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugConnection(ctx context.Context, sel ast.SelectionSet, v models.BugConnection) graphql.Marshaler {
1746 return ec._BugConnection(ctx, sel, &v)
1747}
1748
1749func (ec *executionContext) marshalNBugConnection2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugConnection(ctx context.Context, sel ast.SelectionSet, v *models.BugConnection) graphql.Marshaler {
1750 if v == nil {
1751 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
1752 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
1753 }
1754 return graphql.Null
1755 }
1756 return ec._BugConnection(ctx, sel, v)
1757}
1758
1759func (ec *executionContext) marshalNBugEdge2ᚕᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.BugEdge) graphql.Marshaler {
1760 ret := make(graphql.Array, len(v))
1761 var wg sync.WaitGroup
1762 isLen1 := len(v) == 1
1763 if !isLen1 {
1764 wg.Add(len(v))
1765 }
1766 for i := range v {
1767 i := i
1768 fc := &graphql.FieldContext{
1769 Index: &i,
1770 Result: &v[i],
1771 }
1772 ctx := graphql.WithFieldContext(ctx, fc)
1773 f := func(i int) {
1774 defer func() {
1775 if r := recover(); r != nil {
1776 ec.Error(ctx, ec.Recover(ctx, r))
1777 ret = nil
1778 }
1779 }()
1780 if !isLen1 {
1781 defer wg.Done()
1782 }
1783 ret[i] = ec.marshalNBugEdge2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugEdge(ctx, sel, v[i])
1784 }
1785 if isLen1 {
1786 f(i)
1787 } else {
1788 go f(i)
1789 }
1790
1791 }
1792 wg.Wait()
1793
1794 for _, e := range ret {
1795 if e == graphql.Null {
1796 return graphql.Null
1797 }
1798 }
1799
1800 return ret
1801}
1802
1803func (ec *executionContext) marshalNBugEdge2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugEdge(ctx context.Context, sel ast.SelectionSet, v *models.BugEdge) graphql.Marshaler {
1804 if v == nil {
1805 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
1806 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
1807 }
1808 return graphql.Null
1809 }
1810 return ec._BugEdge(ctx, sel, v)
1811}
1812
1813func (ec *executionContext) marshalOBug2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx context.Context, sel ast.SelectionSet, v models.BugWrapper) graphql.Marshaler {
1814 if v == nil {
1815 return graphql.Null
1816 }
1817 return ec._Bug(ctx, sel, v)
1818}
1819
1820// endregion ***************************** type.gotpl *****************************