label.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"
 12	"sync/atomic"
 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/vektah/gqlparser/v2/ast"
 18)
 19
 20// region    ************************** generated!.gotpl **************************
 21
 22type LabelResolver interface {
 23	Name(ctx context.Context, obj *bug.Label) (string, error)
 24	Color(ctx context.Context, obj *bug.Label) (*color.RGBA, error)
 25}
 26
 27// endregion ************************** generated!.gotpl **************************
 28
 29// region    ***************************** args.gotpl *****************************
 30
 31// endregion ***************************** args.gotpl *****************************
 32
 33// region    ************************** directives.gotpl **************************
 34
 35// endregion ************************** directives.gotpl **************************
 36
 37// region    **************************** field.gotpl *****************************
 38
 39func (ec *executionContext) _Label_name(ctx context.Context, field graphql.CollectedField, obj *bug.Label) (ret graphql.Marshaler) {
 40	fc, err := ec.fieldContext_Label_name(ctx, field)
 41	if err != nil {
 42		return graphql.Null
 43	}
 44	ctx = graphql.WithFieldContext(ctx, fc)
 45	defer func() {
 46		if r := recover(); r != nil {
 47			ec.Error(ctx, ec.Recover(ctx, r))
 48			ret = graphql.Null
 49		}
 50	}()
 51	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
 52		ctx = rctx // use context from middleware stack in children
 53		return ec.resolvers.Label().Name(rctx, obj)
 54	})
 55	if err != nil {
 56		ec.Error(ctx, err)
 57		return graphql.Null
 58	}
 59	if resTmp == nil {
 60		if !graphql.HasFieldError(ctx, fc) {
 61			ec.Errorf(ctx, "must not be null")
 62		}
 63		return graphql.Null
 64	}
 65	res := resTmp.(string)
 66	fc.Result = res
 67	return ec.marshalNString2string(ctx, field.Selections, res)
 68}
 69
 70func (ec *executionContext) fieldContext_Label_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
 71	fc = &graphql.FieldContext{
 72		Object:     "Label",
 73		Field:      field,
 74		IsMethod:   true,
 75		IsResolver: true,
 76		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
 77			return nil, errors.New("field of type String does not have child fields")
 78		},
 79	}
 80	return fc, nil
 81}
 82
 83func (ec *executionContext) _Label_color(ctx context.Context, field graphql.CollectedField, obj *bug.Label) (ret graphql.Marshaler) {
 84	fc, err := ec.fieldContext_Label_color(ctx, field)
 85	if err != nil {
 86		return graphql.Null
 87	}
 88	ctx = graphql.WithFieldContext(ctx, fc)
 89	defer func() {
 90		if r := recover(); r != nil {
 91			ec.Error(ctx, ec.Recover(ctx, r))
 92			ret = graphql.Null
 93		}
 94	}()
 95	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
 96		ctx = rctx // use context from middleware stack in children
 97		return ec.resolvers.Label().Color(rctx, obj)
 98	})
 99	if err != nil {
100		ec.Error(ctx, err)
101		return graphql.Null
102	}
103	if resTmp == nil {
104		if !graphql.HasFieldError(ctx, fc) {
105			ec.Errorf(ctx, "must not be null")
106		}
107		return graphql.Null
108	}
109	res := resTmp.(*color.RGBA)
110	fc.Result = res
111	return ec.marshalNColor2ᚖimageᚋcolorᚐRGBA(ctx, field.Selections, res)
112}
113
114func (ec *executionContext) fieldContext_Label_color(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
115	fc = &graphql.FieldContext{
116		Object:     "Label",
117		Field:      field,
118		IsMethod:   true,
119		IsResolver: true,
120		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
121			switch field.Name {
122			case "R":
123				return ec.fieldContext_Color_R(ctx, field)
124			case "G":
125				return ec.fieldContext_Color_G(ctx, field)
126			case "B":
127				return ec.fieldContext_Color_B(ctx, field)
128			}
129			return nil, fmt.Errorf("no field named %q was found under type Color", field.Name)
130		},
131	}
132	return fc, nil
133}
134
135func (ec *executionContext) _LabelConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.LabelConnection) (ret graphql.Marshaler) {
136	fc, err := ec.fieldContext_LabelConnection_edges(ctx, field)
137	if err != nil {
138		return graphql.Null
139	}
140	ctx = graphql.WithFieldContext(ctx, fc)
141	defer func() {
142		if r := recover(); r != nil {
143			ec.Error(ctx, ec.Recover(ctx, r))
144			ret = graphql.Null
145		}
146	}()
147	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
148		ctx = rctx // use context from middleware stack in children
149		return obj.Edges, nil
150	})
151	if err != nil {
152		ec.Error(ctx, err)
153		return graphql.Null
154	}
155	if resTmp == nil {
156		if !graphql.HasFieldError(ctx, fc) {
157			ec.Errorf(ctx, "must not be null")
158		}
159		return graphql.Null
160	}
161	res := resTmp.([]*models.LabelEdge)
162	fc.Result = res
163	return ec.marshalNLabelEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelEdgeᚄ(ctx, field.Selections, res)
164}
165
166func (ec *executionContext) fieldContext_LabelConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
167	fc = &graphql.FieldContext{
168		Object:     "LabelConnection",
169		Field:      field,
170		IsMethod:   false,
171		IsResolver: false,
172		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
173			switch field.Name {
174			case "cursor":
175				return ec.fieldContext_LabelEdge_cursor(ctx, field)
176			case "node":
177				return ec.fieldContext_LabelEdge_node(ctx, field)
178			}
179			return nil, fmt.Errorf("no field named %q was found under type LabelEdge", field.Name)
180		},
181	}
182	return fc, nil
183}
184
185func (ec *executionContext) _LabelConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.LabelConnection) (ret graphql.Marshaler) {
186	fc, err := ec.fieldContext_LabelConnection_nodes(ctx, field)
187	if err != nil {
188		return graphql.Null
189	}
190	ctx = graphql.WithFieldContext(ctx, fc)
191	defer func() {
192		if r := recover(); r != nil {
193			ec.Error(ctx, ec.Recover(ctx, r))
194			ret = graphql.Null
195		}
196	}()
197	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
198		ctx = rctx // use context from middleware stack in children
199		return obj.Nodes, nil
200	})
201	if err != nil {
202		ec.Error(ctx, err)
203		return graphql.Null
204	}
205	if resTmp == nil {
206		if !graphql.HasFieldError(ctx, fc) {
207			ec.Errorf(ctx, "must not be null")
208		}
209		return graphql.Null
210	}
211	res := resTmp.([]bug.Label)
212	fc.Result = res
213	return ec.marshalNLabel2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐLabelᚄ(ctx, field.Selections, res)
214}
215
216func (ec *executionContext) fieldContext_LabelConnection_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
217	fc = &graphql.FieldContext{
218		Object:     "LabelConnection",
219		Field:      field,
220		IsMethod:   false,
221		IsResolver: false,
222		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
223			switch field.Name {
224			case "name":
225				return ec.fieldContext_Label_name(ctx, field)
226			case "color":
227				return ec.fieldContext_Label_color(ctx, field)
228			}
229			return nil, fmt.Errorf("no field named %q was found under type Label", field.Name)
230		},
231	}
232	return fc, nil
233}
234
235func (ec *executionContext) _LabelConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.LabelConnection) (ret graphql.Marshaler) {
236	fc, err := ec.fieldContext_LabelConnection_pageInfo(ctx, field)
237	if err != nil {
238		return graphql.Null
239	}
240	ctx = graphql.WithFieldContext(ctx, fc)
241	defer func() {
242		if r := recover(); r != nil {
243			ec.Error(ctx, ec.Recover(ctx, r))
244			ret = graphql.Null
245		}
246	}()
247	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
248		ctx = rctx // use context from middleware stack in children
249		return obj.PageInfo, nil
250	})
251	if err != nil {
252		ec.Error(ctx, err)
253		return graphql.Null
254	}
255	if resTmp == nil {
256		if !graphql.HasFieldError(ctx, fc) {
257			ec.Errorf(ctx, "must not be null")
258		}
259		return graphql.Null
260	}
261	res := resTmp.(*models.PageInfo)
262	fc.Result = res
263	return ec.marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res)
264}
265
266func (ec *executionContext) fieldContext_LabelConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
267	fc = &graphql.FieldContext{
268		Object:     "LabelConnection",
269		Field:      field,
270		IsMethod:   false,
271		IsResolver: false,
272		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
273			switch field.Name {
274			case "hasNextPage":
275				return ec.fieldContext_PageInfo_hasNextPage(ctx, field)
276			case "hasPreviousPage":
277				return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field)
278			case "startCursor":
279				return ec.fieldContext_PageInfo_startCursor(ctx, field)
280			case "endCursor":
281				return ec.fieldContext_PageInfo_endCursor(ctx, field)
282			}
283			return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name)
284		},
285	}
286	return fc, nil
287}
288
289func (ec *executionContext) _LabelConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.LabelConnection) (ret graphql.Marshaler) {
290	fc, err := ec.fieldContext_LabelConnection_totalCount(ctx, field)
291	if err != nil {
292		return graphql.Null
293	}
294	ctx = graphql.WithFieldContext(ctx, fc)
295	defer func() {
296		if r := recover(); r != nil {
297			ec.Error(ctx, ec.Recover(ctx, r))
298			ret = graphql.Null
299		}
300	}()
301	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
302		ctx = rctx // use context from middleware stack in children
303		return obj.TotalCount, nil
304	})
305	if err != nil {
306		ec.Error(ctx, err)
307		return graphql.Null
308	}
309	if resTmp == nil {
310		if !graphql.HasFieldError(ctx, fc) {
311			ec.Errorf(ctx, "must not be null")
312		}
313		return graphql.Null
314	}
315	res := resTmp.(int)
316	fc.Result = res
317	return ec.marshalNInt2int(ctx, field.Selections, res)
318}
319
320func (ec *executionContext) fieldContext_LabelConnection_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
321	fc = &graphql.FieldContext{
322		Object:     "LabelConnection",
323		Field:      field,
324		IsMethod:   false,
325		IsResolver: false,
326		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
327			return nil, errors.New("field of type Int does not have child fields")
328		},
329	}
330	return fc, nil
331}
332
333func (ec *executionContext) _LabelEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.LabelEdge) (ret graphql.Marshaler) {
334	fc, err := ec.fieldContext_LabelEdge_cursor(ctx, field)
335	if err != nil {
336		return graphql.Null
337	}
338	ctx = graphql.WithFieldContext(ctx, fc)
339	defer func() {
340		if r := recover(); r != nil {
341			ec.Error(ctx, ec.Recover(ctx, r))
342			ret = graphql.Null
343		}
344	}()
345	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
346		ctx = rctx // use context from middleware stack in children
347		return obj.Cursor, nil
348	})
349	if err != nil {
350		ec.Error(ctx, err)
351		return graphql.Null
352	}
353	if resTmp == nil {
354		if !graphql.HasFieldError(ctx, fc) {
355			ec.Errorf(ctx, "must not be null")
356		}
357		return graphql.Null
358	}
359	res := resTmp.(string)
360	fc.Result = res
361	return ec.marshalNString2string(ctx, field.Selections, res)
362}
363
364func (ec *executionContext) fieldContext_LabelEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
365	fc = &graphql.FieldContext{
366		Object:     "LabelEdge",
367		Field:      field,
368		IsMethod:   false,
369		IsResolver: false,
370		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
371			return nil, errors.New("field of type String does not have child fields")
372		},
373	}
374	return fc, nil
375}
376
377func (ec *executionContext) _LabelEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.LabelEdge) (ret graphql.Marshaler) {
378	fc, err := ec.fieldContext_LabelEdge_node(ctx, field)
379	if err != nil {
380		return graphql.Null
381	}
382	ctx = graphql.WithFieldContext(ctx, fc)
383	defer func() {
384		if r := recover(); r != nil {
385			ec.Error(ctx, ec.Recover(ctx, r))
386			ret = graphql.Null
387		}
388	}()
389	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
390		ctx = rctx // use context from middleware stack in children
391		return obj.Node, nil
392	})
393	if err != nil {
394		ec.Error(ctx, err)
395		return graphql.Null
396	}
397	if resTmp == nil {
398		if !graphql.HasFieldError(ctx, fc) {
399			ec.Errorf(ctx, "must not be null")
400		}
401		return graphql.Null
402	}
403	res := resTmp.(bug.Label)
404	fc.Result = res
405	return ec.marshalNLabel2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐLabel(ctx, field.Selections, res)
406}
407
408func (ec *executionContext) fieldContext_LabelEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
409	fc = &graphql.FieldContext{
410		Object:     "LabelEdge",
411		Field:      field,
412		IsMethod:   false,
413		IsResolver: false,
414		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
415			switch field.Name {
416			case "name":
417				return ec.fieldContext_Label_name(ctx, field)
418			case "color":
419				return ec.fieldContext_Label_color(ctx, field)
420			}
421			return nil, fmt.Errorf("no field named %q was found under type Label", field.Name)
422		},
423	}
424	return fc, nil
425}
426
427// endregion **************************** field.gotpl *****************************
428
429// region    **************************** input.gotpl *****************************
430
431// endregion **************************** input.gotpl *****************************
432
433// region    ************************** interface.gotpl ***************************
434
435// endregion ************************** interface.gotpl ***************************
436
437// region    **************************** object.gotpl ****************************
438
439var labelImplementors = []string{"Label"}
440
441func (ec *executionContext) _Label(ctx context.Context, sel ast.SelectionSet, obj *bug.Label) graphql.Marshaler {
442	fields := graphql.CollectFields(ec.OperationContext, sel, labelImplementors)
443
444	out := graphql.NewFieldSet(fields)
445	deferred := make(map[string]*graphql.FieldSet)
446	for i, field := range fields {
447		switch field.Name {
448		case "__typename":
449			out.Values[i] = graphql.MarshalString("Label")
450		case "name":
451			field := field
452
453			innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
454				defer func() {
455					if r := recover(); r != nil {
456						ec.Error(ctx, ec.Recover(ctx, r))
457					}
458				}()
459				res = ec._Label_name(ctx, field, obj)
460				if res == graphql.Null {
461					atomic.AddUint32(&fs.Invalids, 1)
462				}
463				return res
464			}
465
466			if field.Deferrable != nil {
467				dfs, ok := deferred[field.Deferrable.Label]
468				di := 0
469				if ok {
470					dfs.AddField(field)
471					di = len(dfs.Values) - 1
472				} else {
473					dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
474					deferred[field.Deferrable.Label] = dfs
475				}
476				dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
477					return innerFunc(ctx, dfs)
478				})
479
480				// don't run the out.Concurrently() call below
481				out.Values[i] = graphql.Null
482				continue
483			}
484
485			out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
486		case "color":
487			field := field
488
489			innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
490				defer func() {
491					if r := recover(); r != nil {
492						ec.Error(ctx, ec.Recover(ctx, r))
493					}
494				}()
495				res = ec._Label_color(ctx, field, obj)
496				if res == graphql.Null {
497					atomic.AddUint32(&fs.Invalids, 1)
498				}
499				return res
500			}
501
502			if field.Deferrable != nil {
503				dfs, ok := deferred[field.Deferrable.Label]
504				di := 0
505				if ok {
506					dfs.AddField(field)
507					di = len(dfs.Values) - 1
508				} else {
509					dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
510					deferred[field.Deferrable.Label] = dfs
511				}
512				dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
513					return innerFunc(ctx, dfs)
514				})
515
516				// don't run the out.Concurrently() call below
517				out.Values[i] = graphql.Null
518				continue
519			}
520
521			out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
522		default:
523			panic("unknown field " + strconv.Quote(field.Name))
524		}
525	}
526	out.Dispatch(ctx)
527	if out.Invalids > 0 {
528		return graphql.Null
529	}
530
531	atomic.AddInt32(&ec.deferred, int32(len(deferred)))
532
533	for label, dfs := range deferred {
534		ec.processDeferredGroup(graphql.DeferredGroup{
535			Label:    label,
536			Path:     graphql.GetPath(ctx),
537			FieldSet: dfs,
538			Context:  ctx,
539		})
540	}
541
542	return out
543}
544
545var labelConnectionImplementors = []string{"LabelConnection"}
546
547func (ec *executionContext) _LabelConnection(ctx context.Context, sel ast.SelectionSet, obj *models.LabelConnection) graphql.Marshaler {
548	fields := graphql.CollectFields(ec.OperationContext, sel, labelConnectionImplementors)
549
550	out := graphql.NewFieldSet(fields)
551	deferred := make(map[string]*graphql.FieldSet)
552	for i, field := range fields {
553		switch field.Name {
554		case "__typename":
555			out.Values[i] = graphql.MarshalString("LabelConnection")
556		case "edges":
557			out.Values[i] = ec._LabelConnection_edges(ctx, field, obj)
558			if out.Values[i] == graphql.Null {
559				out.Invalids++
560			}
561		case "nodes":
562			out.Values[i] = ec._LabelConnection_nodes(ctx, field, obj)
563			if out.Values[i] == graphql.Null {
564				out.Invalids++
565			}
566		case "pageInfo":
567			out.Values[i] = ec._LabelConnection_pageInfo(ctx, field, obj)
568			if out.Values[i] == graphql.Null {
569				out.Invalids++
570			}
571		case "totalCount":
572			out.Values[i] = ec._LabelConnection_totalCount(ctx, field, obj)
573			if out.Values[i] == graphql.Null {
574				out.Invalids++
575			}
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 labelEdgeImplementors = []string{"LabelEdge"}
600
601func (ec *executionContext) _LabelEdge(ctx context.Context, sel ast.SelectionSet, obj *models.LabelEdge) graphql.Marshaler {
602	fields := graphql.CollectFields(ec.OperationContext, sel, labelEdgeImplementors)
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("LabelEdge")
610		case "cursor":
611			out.Values[i] = ec._LabelEdge_cursor(ctx, field, obj)
612			if out.Values[i] == graphql.Null {
613				out.Invalids++
614			}
615		case "node":
616			out.Values[i] = ec._LabelEdge_node(ctx, field, obj)
617			if out.Values[i] == graphql.Null {
618				out.Invalids++
619			}
620		default:
621			panic("unknown field " + strconv.Quote(field.Name))
622		}
623	}
624	out.Dispatch(ctx)
625	if out.Invalids > 0 {
626		return graphql.Null
627	}
628
629	atomic.AddInt32(&ec.deferred, int32(len(deferred)))
630
631	for label, dfs := range deferred {
632		ec.processDeferredGroup(graphql.DeferredGroup{
633			Label:    label,
634			Path:     graphql.GetPath(ctx),
635			FieldSet: dfs,
636			Context:  ctx,
637		})
638	}
639
640	return out
641}
642
643// endregion **************************** object.gotpl ****************************
644
645// region    ***************************** type.gotpl *****************************
646
647func (ec *executionContext) marshalNLabel2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐLabel(ctx context.Context, sel ast.SelectionSet, v bug.Label) graphql.Marshaler {
648	return ec._Label(ctx, sel, &v)
649}
650
651func (ec *executionContext) marshalNLabel2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐLabelᚄ(ctx context.Context, sel ast.SelectionSet, v []bug.Label) graphql.Marshaler {
652	ret := make(graphql.Array, len(v))
653	var wg sync.WaitGroup
654	isLen1 := len(v) == 1
655	if !isLen1 {
656		wg.Add(len(v))
657	}
658	for i := range v {
659		i := i
660		fc := &graphql.FieldContext{
661			Index:  &i,
662			Result: &v[i],
663		}
664		ctx := graphql.WithFieldContext(ctx, fc)
665		f := func(i int) {
666			defer func() {
667				if r := recover(); r != nil {
668					ec.Error(ctx, ec.Recover(ctx, r))
669					ret = nil
670				}
671			}()
672			if !isLen1 {
673				defer wg.Done()
674			}
675			ret[i] = ec.marshalNLabel2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐLabel(ctx, sel, v[i])
676		}
677		if isLen1 {
678			f(i)
679		} else {
680			go f(i)
681		}
682
683	}
684	wg.Wait()
685
686	for _, e := range ret {
687		if e == graphql.Null {
688			return graphql.Null
689		}
690	}
691
692	return ret
693}
694
695func (ec *executionContext) marshalNLabelConnection2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelConnection(ctx context.Context, sel ast.SelectionSet, v models.LabelConnection) graphql.Marshaler {
696	return ec._LabelConnection(ctx, sel, &v)
697}
698
699func (ec *executionContext) marshalNLabelConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelConnection(ctx context.Context, sel ast.SelectionSet, v *models.LabelConnection) graphql.Marshaler {
700	if v == nil {
701		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
702			ec.Errorf(ctx, "the requested element is null which the schema does not allow")
703		}
704		return graphql.Null
705	}
706	return ec._LabelConnection(ctx, sel, v)
707}
708
709func (ec *executionContext) marshalNLabelEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.LabelEdge) graphql.Marshaler {
710	ret := make(graphql.Array, len(v))
711	var wg sync.WaitGroup
712	isLen1 := len(v) == 1
713	if !isLen1 {
714		wg.Add(len(v))
715	}
716	for i := range v {
717		i := i
718		fc := &graphql.FieldContext{
719			Index:  &i,
720			Result: &v[i],
721		}
722		ctx := graphql.WithFieldContext(ctx, fc)
723		f := func(i int) {
724			defer func() {
725				if r := recover(); r != nil {
726					ec.Error(ctx, ec.Recover(ctx, r))
727					ret = nil
728				}
729			}()
730			if !isLen1 {
731				defer wg.Done()
732			}
733			ret[i] = ec.marshalNLabelEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelEdge(ctx, sel, v[i])
734		}
735		if isLen1 {
736			f(i)
737		} else {
738			go f(i)
739		}
740
741	}
742	wg.Wait()
743
744	for _, e := range ret {
745		if e == graphql.Null {
746			return graphql.Null
747		}
748	}
749
750	return ret
751}
752
753func (ec *executionContext) marshalNLabelEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelEdge(ctx context.Context, sel ast.SelectionSet, v *models.LabelEdge) graphql.Marshaler {
754	if v == nil {
755		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
756			ec.Errorf(ctx, "the requested element is null which the schema does not allow")
757		}
758		return graphql.Null
759	}
760	return ec._LabelEdge(ctx, sel, v)
761}
762
763// endregion ***************************** type.gotpl *****************************