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