1// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
2
3package graph
4
5import (
6 "context"
7 "errors"
8 "fmt"
9 "image/color"
10 "strconv"
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/bug"
17 "github.com/git-bug/git-bug/entity"
18 "github.com/git-bug/git-bug/repository"
19 "github.com/vektah/gqlparser/v2/ast"
20)
21
22// region ************************** generated!.gotpl **************************
23
24type ColorResolver interface {
25 R(ctx context.Context, obj *color.RGBA) (int, error)
26 G(ctx context.Context, obj *color.RGBA) (int, error)
27 B(ctx context.Context, obj *color.RGBA) (int, error)
28}
29
30// endregion ************************** generated!.gotpl **************************
31
32// region ***************************** args.gotpl *****************************
33
34// endregion ***************************** args.gotpl *****************************
35
36// region ************************** directives.gotpl **************************
37
38// endregion ************************** directives.gotpl **************************
39
40// region **************************** field.gotpl *****************************
41
42func (ec *executionContext) _Color_R(ctx context.Context, field graphql.CollectedField, obj *color.RGBA) (ret graphql.Marshaler) {
43 fc, err := ec.fieldContext_Color_R(ctx, field)
44 if err != nil {
45 return graphql.Null
46 }
47 ctx = graphql.WithFieldContext(ctx, fc)
48 defer func() {
49 if r := recover(); r != nil {
50 ec.Error(ctx, ec.Recover(ctx, r))
51 ret = graphql.Null
52 }
53 }()
54 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
55 ctx = rctx // use context from middleware stack in children
56 return ec.resolvers.Color().R(rctx, obj)
57 })
58 if err != nil {
59 ec.Error(ctx, err)
60 return graphql.Null
61 }
62 if resTmp == nil {
63 if !graphql.HasFieldError(ctx, fc) {
64 ec.Errorf(ctx, "must not be null")
65 }
66 return graphql.Null
67 }
68 res := resTmp.(int)
69 fc.Result = res
70 return ec.marshalNInt2int(ctx, field.Selections, res)
71}
72
73func (ec *executionContext) fieldContext_Color_R(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
74 fc = &graphql.FieldContext{
75 Object: "Color",
76 Field: field,
77 IsMethod: true,
78 IsResolver: true,
79 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
80 return nil, errors.New("field of type Int does not have child fields")
81 },
82 }
83 return fc, nil
84}
85
86func (ec *executionContext) _Color_G(ctx context.Context, field graphql.CollectedField, obj *color.RGBA) (ret graphql.Marshaler) {
87 fc, err := ec.fieldContext_Color_G(ctx, field)
88 if err != nil {
89 return graphql.Null
90 }
91 ctx = graphql.WithFieldContext(ctx, fc)
92 defer func() {
93 if r := recover(); r != nil {
94 ec.Error(ctx, ec.Recover(ctx, r))
95 ret = graphql.Null
96 }
97 }()
98 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
99 ctx = rctx // use context from middleware stack in children
100 return ec.resolvers.Color().G(rctx, obj)
101 })
102 if err != nil {
103 ec.Error(ctx, err)
104 return graphql.Null
105 }
106 if resTmp == nil {
107 if !graphql.HasFieldError(ctx, fc) {
108 ec.Errorf(ctx, "must not be null")
109 }
110 return graphql.Null
111 }
112 res := resTmp.(int)
113 fc.Result = res
114 return ec.marshalNInt2int(ctx, field.Selections, res)
115}
116
117func (ec *executionContext) fieldContext_Color_G(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
118 fc = &graphql.FieldContext{
119 Object: "Color",
120 Field: field,
121 IsMethod: true,
122 IsResolver: true,
123 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
124 return nil, errors.New("field of type Int does not have child fields")
125 },
126 }
127 return fc, nil
128}
129
130func (ec *executionContext) _Color_B(ctx context.Context, field graphql.CollectedField, obj *color.RGBA) (ret graphql.Marshaler) {
131 fc, err := ec.fieldContext_Color_B(ctx, field)
132 if err != nil {
133 return graphql.Null
134 }
135 ctx = graphql.WithFieldContext(ctx, fc)
136 defer func() {
137 if r := recover(); r != nil {
138 ec.Error(ctx, ec.Recover(ctx, r))
139 ret = graphql.Null
140 }
141 }()
142 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
143 ctx = rctx // use context from middleware stack in children
144 return ec.resolvers.Color().B(rctx, obj)
145 })
146 if err != nil {
147 ec.Error(ctx, err)
148 return graphql.Null
149 }
150 if resTmp == nil {
151 if !graphql.HasFieldError(ctx, fc) {
152 ec.Errorf(ctx, "must not be null")
153 }
154 return graphql.Null
155 }
156 res := resTmp.(int)
157 fc.Result = res
158 return ec.marshalNInt2int(ctx, field.Selections, res)
159}
160
161func (ec *executionContext) fieldContext_Color_B(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
162 fc = &graphql.FieldContext{
163 Object: "Color",
164 Field: field,
165 IsMethod: true,
166 IsResolver: true,
167 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
168 return nil, errors.New("field of type Int does not have child fields")
169 },
170 }
171 return fc, nil
172}
173
174func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) (ret graphql.Marshaler) {
175 fc, err := ec.fieldContext_PageInfo_hasNextPage(ctx, field)
176 if err != nil {
177 return graphql.Null
178 }
179 ctx = graphql.WithFieldContext(ctx, fc)
180 defer func() {
181 if r := recover(); r != nil {
182 ec.Error(ctx, ec.Recover(ctx, r))
183 ret = graphql.Null
184 }
185 }()
186 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
187 ctx = rctx // use context from middleware stack in children
188 return obj.HasNextPage, nil
189 })
190 if err != nil {
191 ec.Error(ctx, err)
192 return graphql.Null
193 }
194 if resTmp == nil {
195 if !graphql.HasFieldError(ctx, fc) {
196 ec.Errorf(ctx, "must not be null")
197 }
198 return graphql.Null
199 }
200 res := resTmp.(bool)
201 fc.Result = res
202 return ec.marshalNBoolean2bool(ctx, field.Selections, res)
203}
204
205func (ec *executionContext) fieldContext_PageInfo_hasNextPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
206 fc = &graphql.FieldContext{
207 Object: "PageInfo",
208 Field: field,
209 IsMethod: false,
210 IsResolver: false,
211 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
212 return nil, errors.New("field of type Boolean does not have child fields")
213 },
214 }
215 return fc, nil
216}
217
218func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) (ret graphql.Marshaler) {
219 fc, err := ec.fieldContext_PageInfo_hasPreviousPage(ctx, field)
220 if err != nil {
221 return graphql.Null
222 }
223 ctx = graphql.WithFieldContext(ctx, fc)
224 defer func() {
225 if r := recover(); r != nil {
226 ec.Error(ctx, ec.Recover(ctx, r))
227 ret = graphql.Null
228 }
229 }()
230 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
231 ctx = rctx // use context from middleware stack in children
232 return obj.HasPreviousPage, nil
233 })
234 if err != nil {
235 ec.Error(ctx, err)
236 return graphql.Null
237 }
238 if resTmp == nil {
239 if !graphql.HasFieldError(ctx, fc) {
240 ec.Errorf(ctx, "must not be null")
241 }
242 return graphql.Null
243 }
244 res := resTmp.(bool)
245 fc.Result = res
246 return ec.marshalNBoolean2bool(ctx, field.Selections, res)
247}
248
249func (ec *executionContext) fieldContext_PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
250 fc = &graphql.FieldContext{
251 Object: "PageInfo",
252 Field: field,
253 IsMethod: false,
254 IsResolver: false,
255 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
256 return nil, errors.New("field of type Boolean does not have child fields")
257 },
258 }
259 return fc, nil
260}
261
262func (ec *executionContext) _PageInfo_startCursor(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) (ret graphql.Marshaler) {
263 fc, err := ec.fieldContext_PageInfo_startCursor(ctx, field)
264 if err != nil {
265 return graphql.Null
266 }
267 ctx = graphql.WithFieldContext(ctx, fc)
268 defer func() {
269 if r := recover(); r != nil {
270 ec.Error(ctx, ec.Recover(ctx, r))
271 ret = graphql.Null
272 }
273 }()
274 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
275 ctx = rctx // use context from middleware stack in children
276 return obj.StartCursor, nil
277 })
278 if err != nil {
279 ec.Error(ctx, err)
280 return graphql.Null
281 }
282 if resTmp == nil {
283 if !graphql.HasFieldError(ctx, fc) {
284 ec.Errorf(ctx, "must not be null")
285 }
286 return graphql.Null
287 }
288 res := resTmp.(string)
289 fc.Result = res
290 return ec.marshalNString2string(ctx, field.Selections, res)
291}
292
293func (ec *executionContext) fieldContext_PageInfo_startCursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
294 fc = &graphql.FieldContext{
295 Object: "PageInfo",
296 Field: field,
297 IsMethod: false,
298 IsResolver: false,
299 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
300 return nil, errors.New("field of type String does not have child fields")
301 },
302 }
303 return fc, nil
304}
305
306func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) (ret graphql.Marshaler) {
307 fc, err := ec.fieldContext_PageInfo_endCursor(ctx, field)
308 if err != nil {
309 return graphql.Null
310 }
311 ctx = graphql.WithFieldContext(ctx, fc)
312 defer func() {
313 if r := recover(); r != nil {
314 ec.Error(ctx, ec.Recover(ctx, r))
315 ret = graphql.Null
316 }
317 }()
318 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
319 ctx = rctx // use context from middleware stack in children
320 return obj.EndCursor, nil
321 })
322 if err != nil {
323 ec.Error(ctx, err)
324 return graphql.Null
325 }
326 if resTmp == nil {
327 if !graphql.HasFieldError(ctx, fc) {
328 ec.Errorf(ctx, "must not be null")
329 }
330 return graphql.Null
331 }
332 res := resTmp.(string)
333 fc.Result = res
334 return ec.marshalNString2string(ctx, field.Selections, res)
335}
336
337func (ec *executionContext) fieldContext_PageInfo_endCursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
338 fc = &graphql.FieldContext{
339 Object: "PageInfo",
340 Field: field,
341 IsMethod: false,
342 IsResolver: false,
343 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
344 return nil, errors.New("field of type String does not have child fields")
345 },
346 }
347 return fc, nil
348}
349
350// endregion **************************** field.gotpl *****************************
351
352// region **************************** input.gotpl *****************************
353
354// endregion **************************** input.gotpl *****************************
355
356// region ************************** interface.gotpl ***************************
357
358func (ec *executionContext) _Authored(ctx context.Context, sel ast.SelectionSet, obj models.Authored) graphql.Marshaler {
359 switch obj := (obj).(type) {
360 case nil:
361 return graphql.Null
362 case bug.Comment:
363 return ec._Comment(ctx, sel, &obj)
364 case *bug.Comment:
365 if obj == nil {
366 return graphql.Null
367 }
368 return ec._Comment(ctx, sel, obj)
369 case models.BugWrapper:
370 if obj == nil {
371 return graphql.Null
372 }
373 return ec._Bug(ctx, sel, obj)
374 case *bug.CreateOperation:
375 if obj == nil {
376 return graphql.Null
377 }
378 return ec._CreateOperation(ctx, sel, obj)
379 case *bug.SetTitleOperation:
380 if obj == nil {
381 return graphql.Null
382 }
383 return ec._SetTitleOperation(ctx, sel, obj)
384 case *bug.AddCommentOperation:
385 if obj == nil {
386 return graphql.Null
387 }
388 return ec._AddCommentOperation(ctx, sel, obj)
389 case *bug.EditCommentOperation:
390 if obj == nil {
391 return graphql.Null
392 }
393 return ec._EditCommentOperation(ctx, sel, obj)
394 case *bug.SetStatusOperation:
395 if obj == nil {
396 return graphql.Null
397 }
398 return ec._SetStatusOperation(ctx, sel, obj)
399 case *bug.LabelChangeOperation:
400 if obj == nil {
401 return graphql.Null
402 }
403 return ec._LabelChangeOperation(ctx, sel, obj)
404 case *bug.CreateTimelineItem:
405 if obj == nil {
406 return graphql.Null
407 }
408 return ec._CreateTimelineItem(ctx, sel, obj)
409 case *bug.AddCommentTimelineItem:
410 if obj == nil {
411 return graphql.Null
412 }
413 return ec._AddCommentTimelineItem(ctx, sel, obj)
414 case *bug.LabelChangeTimelineItem:
415 if obj == nil {
416 return graphql.Null
417 }
418 return ec._LabelChangeTimelineItem(ctx, sel, obj)
419 case *bug.SetStatusTimelineItem:
420 if obj == nil {
421 return graphql.Null
422 }
423 return ec._SetStatusTimelineItem(ctx, sel, obj)
424 case *bug.SetTitleTimelineItem:
425 if obj == nil {
426 return graphql.Null
427 }
428 return ec._SetTitleTimelineItem(ctx, sel, obj)
429 default:
430 panic(fmt.Errorf("unexpected type %T", obj))
431 }
432}
433
434// endregion ************************** interface.gotpl ***************************
435
436// region **************************** object.gotpl ****************************
437
438var colorImplementors = []string{"Color"}
439
440func (ec *executionContext) _Color(ctx context.Context, sel ast.SelectionSet, obj *color.RGBA) graphql.Marshaler {
441 fields := graphql.CollectFields(ec.OperationContext, sel, colorImplementors)
442
443 out := graphql.NewFieldSet(fields)
444 deferred := make(map[string]*graphql.FieldSet)
445 for i, field := range fields {
446 switch field.Name {
447 case "__typename":
448 out.Values[i] = graphql.MarshalString("Color")
449 case "R":
450 field := field
451
452 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
453 defer func() {
454 if r := recover(); r != nil {
455 ec.Error(ctx, ec.Recover(ctx, r))
456 }
457 }()
458 res = ec._Color_R(ctx, field, obj)
459 if res == graphql.Null {
460 atomic.AddUint32(&fs.Invalids, 1)
461 }
462 return res
463 }
464
465 if field.Deferrable != nil {
466 dfs, ok := deferred[field.Deferrable.Label]
467 di := 0
468 if ok {
469 dfs.AddField(field)
470 di = len(dfs.Values) - 1
471 } else {
472 dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
473 deferred[field.Deferrable.Label] = dfs
474 }
475 dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
476 return innerFunc(ctx, dfs)
477 })
478
479 // don't run the out.Concurrently() call below
480 out.Values[i] = graphql.Null
481 continue
482 }
483
484 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
485 case "G":
486 field := field
487
488 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
489 defer func() {
490 if r := recover(); r != nil {
491 ec.Error(ctx, ec.Recover(ctx, r))
492 }
493 }()
494 res = ec._Color_G(ctx, field, obj)
495 if res == graphql.Null {
496 atomic.AddUint32(&fs.Invalids, 1)
497 }
498 return res
499 }
500
501 if field.Deferrable != nil {
502 dfs, ok := deferred[field.Deferrable.Label]
503 di := 0
504 if ok {
505 dfs.AddField(field)
506 di = len(dfs.Values) - 1
507 } else {
508 dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
509 deferred[field.Deferrable.Label] = dfs
510 }
511 dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
512 return innerFunc(ctx, dfs)
513 })
514
515 // don't run the out.Concurrently() call below
516 out.Values[i] = graphql.Null
517 continue
518 }
519
520 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
521 case "B":
522 field := field
523
524 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
525 defer func() {
526 if r := recover(); r != nil {
527 ec.Error(ctx, ec.Recover(ctx, r))
528 }
529 }()
530 res = ec._Color_B(ctx, field, obj)
531 if res == graphql.Null {
532 atomic.AddUint32(&fs.Invalids, 1)
533 }
534 return res
535 }
536
537 if field.Deferrable != nil {
538 dfs, ok := deferred[field.Deferrable.Label]
539 di := 0
540 if ok {
541 dfs.AddField(field)
542 di = len(dfs.Values) - 1
543 } else {
544 dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
545 deferred[field.Deferrable.Label] = dfs
546 }
547 dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
548 return innerFunc(ctx, dfs)
549 })
550
551 // don't run the out.Concurrently() call below
552 out.Values[i] = graphql.Null
553 continue
554 }
555
556 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
557 default:
558 panic("unknown field " + strconv.Quote(field.Name))
559 }
560 }
561 out.Dispatch(ctx)
562 if out.Invalids > 0 {
563 return graphql.Null
564 }
565
566 atomic.AddInt32(&ec.deferred, int32(len(deferred)))
567
568 for label, dfs := range deferred {
569 ec.processDeferredGroup(graphql.DeferredGroup{
570 Label: label,
571 Path: graphql.GetPath(ctx),
572 FieldSet: dfs,
573 Context: ctx,
574 })
575 }
576
577 return out
578}
579
580var pageInfoImplementors = []string{"PageInfo"}
581
582func (ec *executionContext) _PageInfo(ctx context.Context, sel ast.SelectionSet, obj *models.PageInfo) graphql.Marshaler {
583 fields := graphql.CollectFields(ec.OperationContext, sel, pageInfoImplementors)
584
585 out := graphql.NewFieldSet(fields)
586 deferred := make(map[string]*graphql.FieldSet)
587 for i, field := range fields {
588 switch field.Name {
589 case "__typename":
590 out.Values[i] = graphql.MarshalString("PageInfo")
591 case "hasNextPage":
592 out.Values[i] = ec._PageInfo_hasNextPage(ctx, field, obj)
593 if out.Values[i] == graphql.Null {
594 out.Invalids++
595 }
596 case "hasPreviousPage":
597 out.Values[i] = ec._PageInfo_hasPreviousPage(ctx, field, obj)
598 if out.Values[i] == graphql.Null {
599 out.Invalids++
600 }
601 case "startCursor":
602 out.Values[i] = ec._PageInfo_startCursor(ctx, field, obj)
603 if out.Values[i] == graphql.Null {
604 out.Invalids++
605 }
606 case "endCursor":
607 out.Values[i] = ec._PageInfo_endCursor(ctx, field, obj)
608 if out.Values[i] == graphql.Null {
609 out.Invalids++
610 }
611 default:
612 panic("unknown field " + strconv.Quote(field.Name))
613 }
614 }
615 out.Dispatch(ctx)
616 if out.Invalids > 0 {
617 return graphql.Null
618 }
619
620 atomic.AddInt32(&ec.deferred, int32(len(deferred)))
621
622 for label, dfs := range deferred {
623 ec.processDeferredGroup(graphql.DeferredGroup{
624 Label: label,
625 Path: graphql.GetPath(ctx),
626 FieldSet: dfs,
627 Context: ctx,
628 })
629 }
630
631 return out
632}
633
634// endregion **************************** object.gotpl ****************************
635
636// region ***************************** type.gotpl *****************************
637
638func (ec *executionContext) marshalNColor2imageácoloráRGBA(ctx context.Context, sel ast.SelectionSet, v color.RGBA) graphql.Marshaler {
639 return ec._Color(ctx, sel, &v)
640}
641
642func (ec *executionContext) marshalNColor2áimageácoloráRGBA(ctx context.Context, sel ast.SelectionSet, v *color.RGBA) graphql.Marshaler {
643 if v == nil {
644 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
645 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
646 }
647 return graphql.Null
648 }
649 return ec._Color(ctx, sel, v)
650}
651
652func (ec *executionContext) unmarshalNCombinedId2githubácomáMichaelMureágitábugáentityáCombinedId(ctx context.Context, v interface{}) (entity.CombinedId, error) {
653 var res entity.CombinedId
654 err := res.UnmarshalGQL(v)
655 return res, graphql.ErrorOnPath(ctx, err)
656}
657
658func (ec *executionContext) marshalNCombinedId2githubácomáMichaelMureágitábugáentityáCombinedId(ctx context.Context, sel ast.SelectionSet, v entity.CombinedId) graphql.Marshaler {
659 return v
660}
661
662func (ec *executionContext) unmarshalNHash2githubácomáMichaelMureágitábugárepositoryáHash(ctx context.Context, v interface{}) (repository.Hash, error) {
663 var res repository.Hash
664 err := res.UnmarshalGQL(v)
665 return res, graphql.ErrorOnPath(ctx, err)
666}
667
668func (ec *executionContext) marshalNHash2githubácomáMichaelMureágitábugárepositoryáHash(ctx context.Context, sel ast.SelectionSet, v repository.Hash) graphql.Marshaler {
669 return v
670}
671
672func (ec *executionContext) unmarshalNHash2ágithubácomáMichaelMureágitábugárepositoryáHashá(ctx context.Context, v interface{}) ([]repository.Hash, error) {
673 var vSlice []interface{}
674 if v != nil {
675 vSlice = graphql.CoerceList(v)
676 }
677 var err error
678 res := make([]repository.Hash, len(vSlice))
679 for i := range vSlice {
680 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
681 res[i], err = ec.unmarshalNHash2githubácomáMichaelMureágitábugárepositoryáHash(ctx, vSlice[i])
682 if err != nil {
683 return nil, err
684 }
685 }
686 return res, nil
687}
688
689func (ec *executionContext) marshalNHash2ágithubácomáMichaelMureágitábugárepositoryáHashá(ctx context.Context, sel ast.SelectionSet, v []repository.Hash) graphql.Marshaler {
690 ret := make(graphql.Array, len(v))
691 for i := range v {
692 ret[i] = ec.marshalNHash2githubácomáMichaelMureágitábugárepositoryáHash(ctx, sel, v[i])
693 }
694
695 for _, e := range ret {
696 if e == graphql.Null {
697 return graphql.Null
698 }
699 }
700
701 return ret
702}
703
704func (ec *executionContext) marshalNPageInfo2ágithubácomáMichaelMureágitábugáapiágraphqlámodelsáPageInfo(ctx context.Context, sel ast.SelectionSet, v *models.PageInfo) graphql.Marshaler {
705 if v == nil {
706 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
707 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
708 }
709 return graphql.Null
710 }
711 return ec._PageInfo(ctx, sel, v)
712}
713
714func (ec *executionContext) unmarshalNTime2timeáTime(ctx context.Context, v interface{}) (time.Time, error) {
715 res, err := graphql.UnmarshalTime(v)
716 return res, graphql.ErrorOnPath(ctx, err)
717}
718
719func (ec *executionContext) marshalNTime2timeáTime(ctx context.Context, sel ast.SelectionSet, v time.Time) graphql.Marshaler {
720 res := graphql.MarshalTime(v)
721 if res == graphql.Null {
722 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
723 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
724 }
725 }
726 return res
727}
728
729func (ec *executionContext) unmarshalNTime2átimeáTime(ctx context.Context, v interface{}) (*time.Time, error) {
730 res, err := graphql.UnmarshalTime(v)
731 return &res, graphql.ErrorOnPath(ctx, err)
732}
733
734func (ec *executionContext) marshalNTime2átimeáTime(ctx context.Context, sel ast.SelectionSet, v *time.Time) graphql.Marshaler {
735 if v == nil {
736 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
737 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
738 }
739 return graphql.Null
740 }
741 res := graphql.MarshalTime(*v)
742 if res == graphql.Null {
743 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
744 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
745 }
746 }
747 return res
748}
749
750func (ec *executionContext) unmarshalOHash2ágithubácomáMichaelMureágitábugárepositoryáHashá(ctx context.Context, v interface{}) ([]repository.Hash, error) {
751 if v == nil {
752 return nil, nil
753 }
754 var vSlice []interface{}
755 if v != nil {
756 vSlice = graphql.CoerceList(v)
757 }
758 var err error
759 res := make([]repository.Hash, len(vSlice))
760 for i := range vSlice {
761 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
762 res[i], err = ec.unmarshalNHash2githubácomáMichaelMureágitábugárepositoryáHash(ctx, vSlice[i])
763 if err != nil {
764 return nil, err
765 }
766 }
767 return res, nil
768}
769
770func (ec *executionContext) marshalOHash2ágithubácomáMichaelMureágitábugárepositoryáHashá(ctx context.Context, sel ast.SelectionSet, v []repository.Hash) graphql.Marshaler {
771 if v == nil {
772 return graphql.Null
773 }
774 ret := make(graphql.Array, len(v))
775 for i := range v {
776 ret[i] = ec.marshalNHash2githubácomáMichaelMureágitábugárepositoryáHash(ctx, sel, v[i])
777 }
778
779 for _, e := range ret {
780 if e == graphql.Null {
781 return graphql.Null
782 }
783 }
784
785 return ret
786}
787
788// endregion ***************************** type.gotpl *****************************