types.generated.go

  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) (any, 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(_ 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) (any, 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(_ 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) (any, 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(_ 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) (any, 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(_ 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) (any, 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(_ 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) (any, 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(_ 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) (any, 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(_ 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.SetTitleTimelineItem:
363		if obj == nil {
364			return graphql.Null
365		}
366		return ec._BugSetTitleTimelineItem(ctx, sel, obj)
367	case *bug.SetTitleOperation:
368		if obj == nil {
369			return graphql.Null
370		}
371		return ec._BugSetTitleOperation(ctx, sel, obj)
372	case *bug.SetStatusTimelineItem:
373		if obj == nil {
374			return graphql.Null
375		}
376		return ec._BugSetStatusTimelineItem(ctx, sel, obj)
377	case *bug.SetStatusOperation:
378		if obj == nil {
379			return graphql.Null
380		}
381		return ec._BugSetStatusOperation(ctx, sel, obj)
382	case *bug.LabelChangeTimelineItem:
383		if obj == nil {
384			return graphql.Null
385		}
386		return ec._BugLabelChangeTimelineItem(ctx, sel, obj)
387	case *bug.LabelChangeOperation:
388		if obj == nil {
389			return graphql.Null
390		}
391		return ec._BugLabelChangeOperation(ctx, sel, obj)
392	case *bug.EditCommentOperation:
393		if obj == nil {
394			return graphql.Null
395		}
396		return ec._BugEditCommentOperation(ctx, sel, obj)
397	case *bug.CreateTimelineItem:
398		if obj == nil {
399			return graphql.Null
400		}
401		return ec._BugCreateTimelineItem(ctx, sel, obj)
402	case *bug.CreateOperation:
403		if obj == nil {
404			return graphql.Null
405		}
406		return ec._BugCreateOperation(ctx, sel, obj)
407	case *bug.AddCommentTimelineItem:
408		if obj == nil {
409			return graphql.Null
410		}
411		return ec._BugAddCommentTimelineItem(ctx, sel, obj)
412	case *bug.AddCommentOperation:
413		if obj == nil {
414			return graphql.Null
415		}
416		return ec._BugAddCommentOperation(ctx, sel, obj)
417	case models.BugWrapper:
418		if obj == nil {
419			return graphql.Null
420		}
421		return ec._Bug(ctx, sel, obj)
422	case bug.Comment:
423		return ec._BugComment(ctx, sel, &obj)
424	case *bug.Comment:
425		if obj == nil {
426			return graphql.Null
427		}
428		return ec._BugComment(ctx, sel, obj)
429	default:
430		panic(fmt.Errorf("unexpected type %T", obj))
431	}
432}
433
434func (ec *executionContext) _Entity(ctx context.Context, sel ast.SelectionSet, obj models.Entity) graphql.Marshaler {
435	switch obj := (obj).(type) {
436	case nil:
437		return graphql.Null
438	case models.BugWrapper:
439		if obj == nil {
440			return graphql.Null
441		}
442		return ec._Bug(ctx, sel, obj)
443	case models.IdentityWrapper:
444		if obj == nil {
445			return graphql.Null
446		}
447		return ec._Identity(ctx, sel, obj)
448	default:
449		panic(fmt.Errorf("unexpected type %T", obj))
450	}
451}
452
453// endregion ************************** interface.gotpl ***************************
454
455// region    **************************** object.gotpl ****************************
456
457var colorImplementors = []string{"Color"}
458
459func (ec *executionContext) _Color(ctx context.Context, sel ast.SelectionSet, obj *color.RGBA) graphql.Marshaler {
460	fields := graphql.CollectFields(ec.OperationContext, sel, colorImplementors)
461
462	out := graphql.NewFieldSet(fields)
463	deferred := make(map[string]*graphql.FieldSet)
464	for i, field := range fields {
465		switch field.Name {
466		case "__typename":
467			out.Values[i] = graphql.MarshalString("Color")
468		case "R":
469			field := field
470
471			innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (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_R(ctx, field, obj)
478				if res == graphql.Null {
479					atomic.AddUint32(&fs.Invalids, 1)
480				}
481				return res
482			}
483
484			if field.Deferrable != nil {
485				dfs, ok := deferred[field.Deferrable.Label]
486				di := 0
487				if ok {
488					dfs.AddField(field)
489					di = len(dfs.Values) - 1
490				} else {
491					dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
492					deferred[field.Deferrable.Label] = dfs
493				}
494				dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
495					return innerFunc(ctx, dfs)
496				})
497
498				// don't run the out.Concurrently() call below
499				out.Values[i] = graphql.Null
500				continue
501			}
502
503			out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
504		case "G":
505			field := field
506
507			innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
508				defer func() {
509					if r := recover(); r != nil {
510						ec.Error(ctx, ec.Recover(ctx, r))
511					}
512				}()
513				res = ec._Color_G(ctx, field, obj)
514				if res == graphql.Null {
515					atomic.AddUint32(&fs.Invalids, 1)
516				}
517				return res
518			}
519
520			if field.Deferrable != nil {
521				dfs, ok := deferred[field.Deferrable.Label]
522				di := 0
523				if ok {
524					dfs.AddField(field)
525					di = len(dfs.Values) - 1
526				} else {
527					dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
528					deferred[field.Deferrable.Label] = dfs
529				}
530				dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
531					return innerFunc(ctx, dfs)
532				})
533
534				// don't run the out.Concurrently() call below
535				out.Values[i] = graphql.Null
536				continue
537			}
538
539			out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
540		case "B":
541			field := field
542
543			innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
544				defer func() {
545					if r := recover(); r != nil {
546						ec.Error(ctx, ec.Recover(ctx, r))
547					}
548				}()
549				res = ec._Color_B(ctx, field, obj)
550				if res == graphql.Null {
551					atomic.AddUint32(&fs.Invalids, 1)
552				}
553				return res
554			}
555
556			if field.Deferrable != nil {
557				dfs, ok := deferred[field.Deferrable.Label]
558				di := 0
559				if ok {
560					dfs.AddField(field)
561					di = len(dfs.Values) - 1
562				} else {
563					dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
564					deferred[field.Deferrable.Label] = dfs
565				}
566				dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
567					return innerFunc(ctx, dfs)
568				})
569
570				// don't run the out.Concurrently() call below
571				out.Values[i] = graphql.Null
572				continue
573			}
574
575			out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
576		default:
577			panic("unknown field " + strconv.Quote(field.Name))
578		}
579	}
580	out.Dispatch(ctx)
581	if out.Invalids > 0 {
582		return graphql.Null
583	}
584
585	atomic.AddInt32(&ec.deferred, int32(len(deferred)))
586
587	for label, dfs := range deferred {
588		ec.processDeferredGroup(graphql.DeferredGroup{
589			Label:    label,
590			Path:     graphql.GetPath(ctx),
591			FieldSet: dfs,
592			Context:  ctx,
593		})
594	}
595
596	return out
597}
598
599var pageInfoImplementors = []string{"PageInfo"}
600
601func (ec *executionContext) _PageInfo(ctx context.Context, sel ast.SelectionSet, obj *models.PageInfo) graphql.Marshaler {
602	fields := graphql.CollectFields(ec.OperationContext, sel, pageInfoImplementors)
603
604	out := graphql.NewFieldSet(fields)
605	deferred := make(map[string]*graphql.FieldSet)
606	for i, field := range fields {
607		switch field.Name {
608		case "__typename":
609			out.Values[i] = graphql.MarshalString("PageInfo")
610		case "hasNextPage":
611			out.Values[i] = ec._PageInfo_hasNextPage(ctx, field, obj)
612			if out.Values[i] == graphql.Null {
613				out.Invalids++
614			}
615		case "hasPreviousPage":
616			out.Values[i] = ec._PageInfo_hasPreviousPage(ctx, field, obj)
617			if out.Values[i] == graphql.Null {
618				out.Invalids++
619			}
620		case "startCursor":
621			out.Values[i] = ec._PageInfo_startCursor(ctx, field, obj)
622			if out.Values[i] == graphql.Null {
623				out.Invalids++
624			}
625		case "endCursor":
626			out.Values[i] = ec._PageInfo_endCursor(ctx, field, obj)
627			if out.Values[i] == graphql.Null {
628				out.Invalids++
629			}
630		default:
631			panic("unknown field " + strconv.Quote(field.Name))
632		}
633	}
634	out.Dispatch(ctx)
635	if out.Invalids > 0 {
636		return graphql.Null
637	}
638
639	atomic.AddInt32(&ec.deferred, int32(len(deferred)))
640
641	for label, dfs := range deferred {
642		ec.processDeferredGroup(graphql.DeferredGroup{
643			Label:    label,
644			Path:     graphql.GetPath(ctx),
645			FieldSet: dfs,
646			Context:  ctx,
647		})
648	}
649
650	return out
651}
652
653// endregion **************************** object.gotpl ****************************
654
655// region    ***************************** type.gotpl *****************************
656
657func (ec *executionContext) marshalNColor2imageᚋcolorᚐRGBA(ctx context.Context, sel ast.SelectionSet, v color.RGBA) graphql.Marshaler {
658	return ec._Color(ctx, sel, &v)
659}
660
661func (ec *executionContext) marshalNColor2ᚖimageᚋcolorᚐRGBA(ctx context.Context, sel ast.SelectionSet, v *color.RGBA) graphql.Marshaler {
662	if v == nil {
663		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
664			ec.Errorf(ctx, "the requested element is null which the schema does not allow")
665		}
666		return graphql.Null
667	}
668	return ec._Color(ctx, sel, v)
669}
670
671func (ec *executionContext) unmarshalNCombinedId2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐCombinedId(ctx context.Context, v any) (entity.CombinedId, error) {
672	var res entity.CombinedId
673	err := res.UnmarshalGQL(v)
674	return res, graphql.ErrorOnPath(ctx, err)
675}
676
677func (ec *executionContext) marshalNCombinedId2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐCombinedId(ctx context.Context, sel ast.SelectionSet, v entity.CombinedId) graphql.Marshaler {
678	return v
679}
680
681func (ec *executionContext) unmarshalNHash2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋrepositoryᚐHash(ctx context.Context, v any) (repository.Hash, error) {
682	var res repository.Hash
683	err := res.UnmarshalGQL(v)
684	return res, graphql.ErrorOnPath(ctx, err)
685}
686
687func (ec *executionContext) marshalNHash2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋrepositoryᚐHash(ctx context.Context, sel ast.SelectionSet, v repository.Hash) graphql.Marshaler {
688	return v
689}
690
691func (ec *executionContext) unmarshalNHash2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx context.Context, v any) ([]repository.Hash, error) {
692	var vSlice []any
693	vSlice = graphql.CoerceList(v)
694	var err error
695	res := make([]repository.Hash, len(vSlice))
696	for i := range vSlice {
697		ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
698		res[i], err = ec.unmarshalNHash2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋrepositoryᚐHash(ctx, vSlice[i])
699		if err != nil {
700			return nil, err
701		}
702	}
703	return res, nil
704}
705
706func (ec *executionContext) marshalNHash2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx context.Context, sel ast.SelectionSet, v []repository.Hash) graphql.Marshaler {
707	ret := make(graphql.Array, len(v))
708	for i := range v {
709		ret[i] = ec.marshalNHash2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋrepositoryᚐHash(ctx, sel, v[i])
710	}
711
712	for _, e := range ret {
713		if e == graphql.Null {
714			return graphql.Null
715		}
716	}
717
718	return ret
719}
720
721func (ec *executionContext) marshalNPageInfo2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx context.Context, sel ast.SelectionSet, v *models.PageInfo) graphql.Marshaler {
722	if v == nil {
723		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
724			ec.Errorf(ctx, "the requested element is null which the schema does not allow")
725		}
726		return graphql.Null
727	}
728	return ec._PageInfo(ctx, sel, v)
729}
730
731func (ec *executionContext) unmarshalNTime2timeᚐTime(ctx context.Context, v any) (time.Time, error) {
732	res, err := graphql.UnmarshalTime(v)
733	return res, graphql.ErrorOnPath(ctx, err)
734}
735
736func (ec *executionContext) marshalNTime2timeᚐTime(ctx context.Context, sel ast.SelectionSet, v time.Time) graphql.Marshaler {
737	_ = sel
738	res := graphql.MarshalTime(v)
739	if res == graphql.Null {
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	}
744	return res
745}
746
747func (ec *executionContext) unmarshalNTime2ᚖtimeᚐTime(ctx context.Context, v any) (*time.Time, error) {
748	res, err := graphql.UnmarshalTime(v)
749	return &res, graphql.ErrorOnPath(ctx, err)
750}
751
752func (ec *executionContext) marshalNTime2ᚖtimeᚐTime(ctx context.Context, sel ast.SelectionSet, v *time.Time) graphql.Marshaler {
753	if v == nil {
754		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
755			ec.Errorf(ctx, "the requested element is null which the schema does not allow")
756		}
757		return graphql.Null
758	}
759	_ = sel
760	res := graphql.MarshalTime(*v)
761	if res == graphql.Null {
762		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
763			ec.Errorf(ctx, "the requested element is null which the schema does not allow")
764		}
765	}
766	return res
767}
768
769func (ec *executionContext) marshalOEntity2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐEntity(ctx context.Context, sel ast.SelectionSet, v models.Entity) graphql.Marshaler {
770	if v == nil {
771		return graphql.Null
772	}
773	return ec._Entity(ctx, sel, v)
774}
775
776func (ec *executionContext) unmarshalOHash2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx context.Context, v any) ([]repository.Hash, error) {
777	if v == nil {
778		return nil, nil
779	}
780	var vSlice []any
781	vSlice = graphql.CoerceList(v)
782	var err error
783	res := make([]repository.Hash, len(vSlice))
784	for i := range vSlice {
785		ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
786		res[i], err = ec.unmarshalNHash2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋrepositoryᚐHash(ctx, vSlice[i])
787		if err != nil {
788			return nil, err
789		}
790	}
791	return res, nil
792}
793
794func (ec *executionContext) marshalOHash2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx context.Context, sel ast.SelectionSet, v []repository.Hash) graphql.Marshaler {
795	if v == nil {
796		return graphql.Null
797	}
798	ret := make(graphql.Array, len(v))
799	for i := range v {
800		ret[i] = ec.marshalNHash2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋrepositoryᚐHash(ctx, sel, v[i])
801	}
802
803	for _, e := range ret {
804		if e == graphql.Null {
805			return graphql.Null
806		}
807	}
808
809	return ret
810}
811
812// endregion ***************************** type.gotpl *****************************