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