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/MichaelMure/git-bug/api/graphql/models"
16 "github.com/MichaelMure/git-bug/entities/bug"
17 "github.com/MichaelMure/git-bug/entity"
18 "github.com/MichaelMure/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 out := graphql.NewFieldSet(fields)
443 var invalids uint32
444 for i, field := range fields {
445 switch field.Name {
446 case "__typename":
447 out.Values[i] = graphql.MarshalString("Color")
448 case "R":
449 field := field
450
451 innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
452 defer func() {
453 if r := recover(); r != nil {
454 ec.Error(ctx, ec.Recover(ctx, r))
455 }
456 }()
457 res = ec._Color_R(ctx, field, obj)
458 if res == graphql.Null {
459 atomic.AddUint32(&invalids, 1)
460 }
461 return res
462 }
463
464 out.Concurrently(i, func() graphql.Marshaler {
465 return innerFunc(ctx)
466
467 })
468 case "G":
469 field := field
470
471 innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
472 defer func() {
473 if r := recover(); r != nil {
474 ec.Error(ctx, ec.Recover(ctx, r))
475 }
476 }()
477 res = ec._Color_G(ctx, field, obj)
478 if res == graphql.Null {
479 atomic.AddUint32(&invalids, 1)
480 }
481 return res
482 }
483
484 out.Concurrently(i, func() graphql.Marshaler {
485 return innerFunc(ctx)
486
487 })
488 case "B":
489 field := field
490
491 innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
492 defer func() {
493 if r := recover(); r != nil {
494 ec.Error(ctx, ec.Recover(ctx, r))
495 }
496 }()
497 res = ec._Color_B(ctx, field, obj)
498 if res == graphql.Null {
499 atomic.AddUint32(&invalids, 1)
500 }
501 return res
502 }
503
504 out.Concurrently(i, func() graphql.Marshaler {
505 return innerFunc(ctx)
506
507 })
508 default:
509 panic("unknown field " + strconv.Quote(field.Name))
510 }
511 }
512 out.Dispatch()
513 if invalids > 0 {
514 return graphql.Null
515 }
516 return out
517}
518
519var pageInfoImplementors = []string{"PageInfo"}
520
521func (ec *executionContext) _PageInfo(ctx context.Context, sel ast.SelectionSet, obj *models.PageInfo) graphql.Marshaler {
522 fields := graphql.CollectFields(ec.OperationContext, sel, pageInfoImplementors)
523 out := graphql.NewFieldSet(fields)
524 var invalids uint32
525 for i, field := range fields {
526 switch field.Name {
527 case "__typename":
528 out.Values[i] = graphql.MarshalString("PageInfo")
529 case "hasNextPage":
530
531 out.Values[i] = ec._PageInfo_hasNextPage(ctx, field, obj)
532
533 if out.Values[i] == graphql.Null {
534 invalids++
535 }
536 case "hasPreviousPage":
537
538 out.Values[i] = ec._PageInfo_hasPreviousPage(ctx, field, obj)
539
540 if out.Values[i] == graphql.Null {
541 invalids++
542 }
543 case "startCursor":
544
545 out.Values[i] = ec._PageInfo_startCursor(ctx, field, obj)
546
547 if out.Values[i] == graphql.Null {
548 invalids++
549 }
550 case "endCursor":
551
552 out.Values[i] = ec._PageInfo_endCursor(ctx, field, obj)
553
554 if out.Values[i] == graphql.Null {
555 invalids++
556 }
557 default:
558 panic("unknown field " + strconv.Quote(field.Name))
559 }
560 }
561 out.Dispatch()
562 if invalids > 0 {
563 return graphql.Null
564 }
565 return out
566}
567
568// endregion **************************** object.gotpl ****************************
569
570// region ***************************** type.gotpl *****************************
571
572func (ec *executionContext) marshalNColor2imageácoloráRGBA(ctx context.Context, sel ast.SelectionSet, v color.RGBA) graphql.Marshaler {
573 return ec._Color(ctx, sel, &v)
574}
575
576func (ec *executionContext) marshalNColor2áimageácoloráRGBA(ctx context.Context, sel ast.SelectionSet, v *color.RGBA) graphql.Marshaler {
577 if v == nil {
578 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
579 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
580 }
581 return graphql.Null
582 }
583 return ec._Color(ctx, sel, v)
584}
585
586func (ec *executionContext) unmarshalNCombinedId2githubácomáMichaelMureágitábugáentityáCombinedId(ctx context.Context, v interface{}) (entity.CombinedId, error) {
587 var res entity.CombinedId
588 err := res.UnmarshalGQL(v)
589 return res, graphql.ErrorOnPath(ctx, err)
590}
591
592func (ec *executionContext) marshalNCombinedId2githubácomáMichaelMureágitábugáentityáCombinedId(ctx context.Context, sel ast.SelectionSet, v entity.CombinedId) graphql.Marshaler {
593 return v
594}
595
596func (ec *executionContext) unmarshalNHash2githubácomáMichaelMureágitábugárepositoryáHash(ctx context.Context, v interface{}) (repository.Hash, error) {
597 var res repository.Hash
598 err := res.UnmarshalGQL(v)
599 return res, graphql.ErrorOnPath(ctx, err)
600}
601
602func (ec *executionContext) marshalNHash2githubácomáMichaelMureágitábugárepositoryáHash(ctx context.Context, sel ast.SelectionSet, v repository.Hash) graphql.Marshaler {
603 return v
604}
605
606func (ec *executionContext) unmarshalNHash2ágithubácomáMichaelMureágitábugárepositoryáHashá(ctx context.Context, v interface{}) ([]repository.Hash, error) {
607 var vSlice []interface{}
608 if v != nil {
609 vSlice = graphql.CoerceList(v)
610 }
611 var err error
612 res := make([]repository.Hash, len(vSlice))
613 for i := range vSlice {
614 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
615 res[i], err = ec.unmarshalNHash2githubácomáMichaelMureágitábugárepositoryáHash(ctx, vSlice[i])
616 if err != nil {
617 return nil, err
618 }
619 }
620 return res, nil
621}
622
623func (ec *executionContext) marshalNHash2ágithubácomáMichaelMureágitábugárepositoryáHashá(ctx context.Context, sel ast.SelectionSet, v []repository.Hash) graphql.Marshaler {
624 ret := make(graphql.Array, len(v))
625 for i := range v {
626 ret[i] = ec.marshalNHash2githubácomáMichaelMureágitábugárepositoryáHash(ctx, sel, v[i])
627 }
628
629 for _, e := range ret {
630 if e == graphql.Null {
631 return graphql.Null
632 }
633 }
634
635 return ret
636}
637
638func (ec *executionContext) marshalNPageInfo2ágithubácomáMichaelMureágitábugáapiágraphqlámodelsáPageInfo(ctx context.Context, sel ast.SelectionSet, v *models.PageInfo) graphql.Marshaler {
639 if v == nil {
640 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
641 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
642 }
643 return graphql.Null
644 }
645 return ec._PageInfo(ctx, sel, v)
646}
647
648func (ec *executionContext) unmarshalNTime2timeáTime(ctx context.Context, v interface{}) (time.Time, error) {
649 res, err := graphql.UnmarshalTime(v)
650 return res, graphql.ErrorOnPath(ctx, err)
651}
652
653func (ec *executionContext) marshalNTime2timeáTime(ctx context.Context, sel ast.SelectionSet, v time.Time) graphql.Marshaler {
654 res := graphql.MarshalTime(v)
655 if res == graphql.Null {
656 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
657 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
658 }
659 }
660 return res
661}
662
663func (ec *executionContext) unmarshalNTime2átimeáTime(ctx context.Context, v interface{}) (*time.Time, error) {
664 res, err := graphql.UnmarshalTime(v)
665 return &res, graphql.ErrorOnPath(ctx, err)
666}
667
668func (ec *executionContext) marshalNTime2átimeáTime(ctx context.Context, sel ast.SelectionSet, v *time.Time) graphql.Marshaler {
669 if v == nil {
670 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
671 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
672 }
673 return graphql.Null
674 }
675 res := graphql.MarshalTime(*v)
676 if res == graphql.Null {
677 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
678 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
679 }
680 }
681 return res
682}
683
684func (ec *executionContext) unmarshalOHash2ágithubácomáMichaelMureágitábugárepositoryáHashá(ctx context.Context, v interface{}) ([]repository.Hash, error) {
685 if v == nil {
686 return nil, nil
687 }
688 var vSlice []interface{}
689 if v != nil {
690 vSlice = graphql.CoerceList(v)
691 }
692 var err error
693 res := make([]repository.Hash, len(vSlice))
694 for i := range vSlice {
695 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
696 res[i], err = ec.unmarshalNHash2githubácomáMichaelMureágitábugárepositoryáHash(ctx, vSlice[i])
697 if err != nil {
698 return nil, err
699 }
700 }
701 return res, nil
702}
703
704func (ec *executionContext) marshalOHash2ágithubácomáMichaelMureágitábugárepositoryáHashá(ctx context.Context, sel ast.SelectionSet, v []repository.Hash) graphql.Marshaler {
705 if v == nil {
706 return graphql.Null
707 }
708 ret := make(graphql.Array, len(v))
709 for i := range v {
710 ret[i] = ec.marshalNHash2githubácomáMichaelMureágitábugárepositoryáHash(ctx, sel, v[i])
711 }
712
713 for _, e := range ret {
714 if e == graphql.Null {
715 return graphql.Null
716 }
717 }
718
719 return ret
720}
721
722// endregion ***************************** type.gotpl *****************************