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