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/git-bug/git-bug/entities/common"
 18	"github.com/vektah/gqlparser/v2/ast"
 19)
 20
 21// region    ************************** generated!.gotpl **************************
 22
 23type LabelResolver interface {
 24	Name(ctx context.Context, obj *common.Label) (string, error)
 25	Color(ctx context.Context, obj *common.Label) (*color.RGBA, error)
 26}
 27
 28// endregion ************************** generated!.gotpl **************************
 29
 30// region    ***************************** args.gotpl *****************************
 31
 32// endregion ***************************** args.gotpl *****************************
 33
 34// region    ************************** directives.gotpl **************************
 35
 36// endregion ************************** directives.gotpl **************************
 37
 38// region    **************************** field.gotpl *****************************
 39
 40func (ec *executionContext) _Label_name(ctx context.Context, field graphql.CollectedField, obj *common.Label) (ret graphql.Marshaler) {
 41	fc, err := ec.fieldContext_Label_name(ctx, field)
 42	if err != nil {
 43		return graphql.Null
 44	}
 45	ctx = graphql.WithFieldContext(ctx, fc)
 46	defer func() {
 47		if r := recover(); r != nil {
 48			ec.Error(ctx, ec.Recover(ctx, r))
 49			ret = graphql.Null
 50		}
 51	}()
 52	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
 53		ctx = rctx // use context from middleware stack in children
 54		return ec.resolvers.Label().Name(rctx, obj)
 55	})
 56	if err != nil {
 57		ec.Error(ctx, err)
 58		return graphql.Null
 59	}
 60	if resTmp == nil {
 61		if !graphql.HasFieldError(ctx, fc) {
 62			ec.Errorf(ctx, "must not be null")
 63		}
 64		return graphql.Null
 65	}
 66	res := resTmp.(string)
 67	fc.Result = res
 68	return ec.marshalNString2string(ctx, field.Selections, res)
 69}
 70
 71func (ec *executionContext) fieldContext_Label_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
 72	fc = &graphql.FieldContext{
 73		Object:     "Label",
 74		Field:      field,
 75		IsMethod:   true,
 76		IsResolver: true,
 77		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
 78			return nil, errors.New("field of type String does not have child fields")
 79		},
 80	}
 81	return fc, nil
 82}
 83
 84func (ec *executionContext) _Label_color(ctx context.Context, field graphql.CollectedField, obj *common.Label) (ret graphql.Marshaler) {
 85	fc, err := ec.fieldContext_Label_color(ctx, field)
 86	if err != nil {
 87		return graphql.Null
 88	}
 89	ctx = graphql.WithFieldContext(ctx, fc)
 90	defer func() {
 91		if r := recover(); r != nil {
 92			ec.Error(ctx, ec.Recover(ctx, r))
 93			ret = graphql.Null
 94		}
 95	}()
 96	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
 97		ctx = rctx // use context from middleware stack in children
 98		return ec.resolvers.Label().Color(rctx, obj)
 99	})
100	if err != nil {
101		ec.Error(ctx, err)
102		return graphql.Null
103	}
104	if resTmp == nil {
105		if !graphql.HasFieldError(ctx, fc) {
106			ec.Errorf(ctx, "must not be null")
107		}
108		return graphql.Null
109	}
110	res := resTmp.(*color.RGBA)
111	fc.Result = res
112	return ec.marshalNColor2áimageácoloráRGBA(ctx, field.Selections, res)
113}
114
115func (ec *executionContext) fieldContext_Label_color(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
116	fc = &graphql.FieldContext{
117		Object:     "Label",
118		Field:      field,
119		IsMethod:   true,
120		IsResolver: true,
121		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
122			switch field.Name {
123			case "R":
124				return ec.fieldContext_Color_R(ctx, field)
125			case "G":
126				return ec.fieldContext_Color_G(ctx, field)
127			case "B":
128				return ec.fieldContext_Color_B(ctx, field)
129			}
130			return nil, fmt.Errorf("no field named %q was found under type Color", field.Name)
131		},
132	}
133	return fc, nil
134}
135
136func (ec *executionContext) _LabelChangeResult_label(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeResult) (ret graphql.Marshaler) {
137	fc, err := ec.fieldContext_LabelChangeResult_label(ctx, field)
138	if err != nil {
139		return graphql.Null
140	}
141	ctx = graphql.WithFieldContext(ctx, fc)
142	defer func() {
143		if r := recover(); r != nil {
144			ec.Error(ctx, ec.Recover(ctx, r))
145			ret = graphql.Null
146		}
147	}()
148	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
149		ctx = rctx // use context from middleware stack in children
150		return obj.Label, nil
151	})
152	if err != nil {
153		ec.Error(ctx, err)
154		return graphql.Null
155	}
156	if resTmp == nil {
157		if !graphql.HasFieldError(ctx, fc) {
158			ec.Errorf(ctx, "must not be null")
159		}
160		return graphql.Null
161	}
162	res := resTmp.(common.Label)
163	fc.Result = res
164	return ec.marshalNLabel2githubácomágitábugágitábugáentitiesácommonáLabel(ctx, field.Selections, res)
165}
166
167func (ec *executionContext) fieldContext_LabelChangeResult_label(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
168	fc = &graphql.FieldContext{
169		Object:     "LabelChangeResult",
170		Field:      field,
171		IsMethod:   false,
172		IsResolver: false,
173		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
174			switch field.Name {
175			case "name":
176				return ec.fieldContext_Label_name(ctx, field)
177			case "color":
178				return ec.fieldContext_Label_color(ctx, field)
179			}
180			return nil, fmt.Errorf("no field named %q was found under type Label", field.Name)
181		},
182	}
183	return fc, nil
184}
185
186func (ec *executionContext) _LabelChangeResult_status(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeResult) (ret graphql.Marshaler) {
187	fc, err := ec.fieldContext_LabelChangeResult_status(ctx, field)
188	if err != nil {
189		return graphql.Null
190	}
191	ctx = graphql.WithFieldContext(ctx, fc)
192	defer func() {
193		if r := recover(); r != nil {
194			ec.Error(ctx, ec.Recover(ctx, r))
195			ret = graphql.Null
196		}
197	}()
198	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
199		ctx = rctx // use context from middleware stack in children
200		return obj.Status, nil
201	})
202	if err != nil {
203		ec.Error(ctx, err)
204		return graphql.Null
205	}
206	if resTmp == nil {
207		if !graphql.HasFieldError(ctx, fc) {
208			ec.Errorf(ctx, "must not be null")
209		}
210		return graphql.Null
211	}
212	res := resTmp.(bug.LabelChangeStatus)
213	fc.Result = res
214	return ec.marshalNLabelChangeStatus2githubácomágitábugágitábugáentitiesábugáLabelChangeStatus(ctx, field.Selections, res)
215}
216
217func (ec *executionContext) fieldContext_LabelChangeResult_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
218	fc = &graphql.FieldContext{
219		Object:     "LabelChangeResult",
220		Field:      field,
221		IsMethod:   false,
222		IsResolver: false,
223		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
224			return nil, errors.New("field of type LabelChangeStatus does not have child fields")
225		},
226	}
227	return fc, nil
228}
229
230func (ec *executionContext) _LabelConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.LabelConnection) (ret graphql.Marshaler) {
231	fc, err := ec.fieldContext_LabelConnection_edges(ctx, field)
232	if err != nil {
233		return graphql.Null
234	}
235	ctx = graphql.WithFieldContext(ctx, fc)
236	defer func() {
237		if r := recover(); r != nil {
238			ec.Error(ctx, ec.Recover(ctx, r))
239			ret = graphql.Null
240		}
241	}()
242	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
243		ctx = rctx // use context from middleware stack in children
244		return obj.Edges, nil
245	})
246	if err != nil {
247		ec.Error(ctx, err)
248		return graphql.Null
249	}
250	if resTmp == nil {
251		if !graphql.HasFieldError(ctx, fc) {
252			ec.Errorf(ctx, "must not be null")
253		}
254		return graphql.Null
255	}
256	res := resTmp.([]*models.LabelEdge)
257	fc.Result = res
258	return ec.marshalNLabelEdge2áágithubácomágitábugágitábugáapiágraphqlámodelsáLabelEdgeá(ctx, field.Selections, res)
259}
260
261func (ec *executionContext) fieldContext_LabelConnection_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
262	fc = &graphql.FieldContext{
263		Object:     "LabelConnection",
264		Field:      field,
265		IsMethod:   false,
266		IsResolver: false,
267		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
268			switch field.Name {
269			case "cursor":
270				return ec.fieldContext_LabelEdge_cursor(ctx, field)
271			case "node":
272				return ec.fieldContext_LabelEdge_node(ctx, field)
273			}
274			return nil, fmt.Errorf("no field named %q was found under type LabelEdge", field.Name)
275		},
276	}
277	return fc, nil
278}
279
280func (ec *executionContext) _LabelConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.LabelConnection) (ret graphql.Marshaler) {
281	fc, err := ec.fieldContext_LabelConnection_nodes(ctx, field)
282	if err != nil {
283		return graphql.Null
284	}
285	ctx = graphql.WithFieldContext(ctx, fc)
286	defer func() {
287		if r := recover(); r != nil {
288			ec.Error(ctx, ec.Recover(ctx, r))
289			ret = graphql.Null
290		}
291	}()
292	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
293		ctx = rctx // use context from middleware stack in children
294		return obj.Nodes, nil
295	})
296	if err != nil {
297		ec.Error(ctx, err)
298		return graphql.Null
299	}
300	if resTmp == nil {
301		if !graphql.HasFieldError(ctx, fc) {
302			ec.Errorf(ctx, "must not be null")
303		}
304		return graphql.Null
305	}
306	res := resTmp.([]common.Label)
307	fc.Result = res
308	return ec.marshalNLabel2ágithubácomágitábugágitábugáentitiesácommonáLabelá(ctx, field.Selections, res)
309}
310
311func (ec *executionContext) fieldContext_LabelConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
312	fc = &graphql.FieldContext{
313		Object:     "LabelConnection",
314		Field:      field,
315		IsMethod:   false,
316		IsResolver: false,
317		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
318			switch field.Name {
319			case "name":
320				return ec.fieldContext_Label_name(ctx, field)
321			case "color":
322				return ec.fieldContext_Label_color(ctx, field)
323			}
324			return nil, fmt.Errorf("no field named %q was found under type Label", field.Name)
325		},
326	}
327	return fc, nil
328}
329
330func (ec *executionContext) _LabelConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.LabelConnection) (ret graphql.Marshaler) {
331	fc, err := ec.fieldContext_LabelConnection_pageInfo(ctx, field)
332	if err != nil {
333		return graphql.Null
334	}
335	ctx = graphql.WithFieldContext(ctx, fc)
336	defer func() {
337		if r := recover(); r != nil {
338			ec.Error(ctx, ec.Recover(ctx, r))
339			ret = graphql.Null
340		}
341	}()
342	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
343		ctx = rctx // use context from middleware stack in children
344		return obj.PageInfo, nil
345	})
346	if err != nil {
347		ec.Error(ctx, err)
348		return graphql.Null
349	}
350	if resTmp == nil {
351		if !graphql.HasFieldError(ctx, fc) {
352			ec.Errorf(ctx, "must not be null")
353		}
354		return graphql.Null
355	}
356	res := resTmp.(*models.PageInfo)
357	fc.Result = res
358	return ec.marshalNPageInfo2ágithubácomágitábugágitábugáapiágraphqlámodelsáPageInfo(ctx, field.Selections, res)
359}
360
361func (ec *executionContext) fieldContext_LabelConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
362	fc = &graphql.FieldContext{
363		Object:     "LabelConnection",
364		Field:      field,
365		IsMethod:   false,
366		IsResolver: false,
367		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
368			switch field.Name {
369			case "hasNextPage":
370				return ec.fieldContext_PageInfo_hasNextPage(ctx, field)
371			case "hasPreviousPage":
372				return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field)
373			case "startCursor":
374				return ec.fieldContext_PageInfo_startCursor(ctx, field)
375			case "endCursor":
376				return ec.fieldContext_PageInfo_endCursor(ctx, field)
377			}
378			return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name)
379		},
380	}
381	return fc, nil
382}
383
384func (ec *executionContext) _LabelConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.LabelConnection) (ret graphql.Marshaler) {
385	fc, err := ec.fieldContext_LabelConnection_totalCount(ctx, field)
386	if err != nil {
387		return graphql.Null
388	}
389	ctx = graphql.WithFieldContext(ctx, fc)
390	defer func() {
391		if r := recover(); r != nil {
392			ec.Error(ctx, ec.Recover(ctx, r))
393			ret = graphql.Null
394		}
395	}()
396	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
397		ctx = rctx // use context from middleware stack in children
398		return obj.TotalCount, nil
399	})
400	if err != nil {
401		ec.Error(ctx, err)
402		return graphql.Null
403	}
404	if resTmp == nil {
405		if !graphql.HasFieldError(ctx, fc) {
406			ec.Errorf(ctx, "must not be null")
407		}
408		return graphql.Null
409	}
410	res := resTmp.(int)
411	fc.Result = res
412	return ec.marshalNInt2int(ctx, field.Selections, res)
413}
414
415func (ec *executionContext) fieldContext_LabelConnection_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
416	fc = &graphql.FieldContext{
417		Object:     "LabelConnection",
418		Field:      field,
419		IsMethod:   false,
420		IsResolver: false,
421		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
422			return nil, errors.New("field of type Int does not have child fields")
423		},
424	}
425	return fc, nil
426}
427
428func (ec *executionContext) _LabelEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.LabelEdge) (ret graphql.Marshaler) {
429	fc, err := ec.fieldContext_LabelEdge_cursor(ctx, field)
430	if err != nil {
431		return graphql.Null
432	}
433	ctx = graphql.WithFieldContext(ctx, fc)
434	defer func() {
435		if r := recover(); r != nil {
436			ec.Error(ctx, ec.Recover(ctx, r))
437			ret = graphql.Null
438		}
439	}()
440	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
441		ctx = rctx // use context from middleware stack in children
442		return obj.Cursor, nil
443	})
444	if err != nil {
445		ec.Error(ctx, err)
446		return graphql.Null
447	}
448	if resTmp == nil {
449		if !graphql.HasFieldError(ctx, fc) {
450			ec.Errorf(ctx, "must not be null")
451		}
452		return graphql.Null
453	}
454	res := resTmp.(string)
455	fc.Result = res
456	return ec.marshalNString2string(ctx, field.Selections, res)
457}
458
459func (ec *executionContext) fieldContext_LabelEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
460	fc = &graphql.FieldContext{
461		Object:     "LabelEdge",
462		Field:      field,
463		IsMethod:   false,
464		IsResolver: false,
465		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
466			return nil, errors.New("field of type String does not have child fields")
467		},
468	}
469	return fc, nil
470}
471
472func (ec *executionContext) _LabelEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.LabelEdge) (ret graphql.Marshaler) {
473	fc, err := ec.fieldContext_LabelEdge_node(ctx, field)
474	if err != nil {
475		return graphql.Null
476	}
477	ctx = graphql.WithFieldContext(ctx, fc)
478	defer func() {
479		if r := recover(); r != nil {
480			ec.Error(ctx, ec.Recover(ctx, r))
481			ret = graphql.Null
482		}
483	}()
484	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
485		ctx = rctx // use context from middleware stack in children
486		return obj.Node, nil
487	})
488	if err != nil {
489		ec.Error(ctx, err)
490		return graphql.Null
491	}
492	if resTmp == nil {
493		if !graphql.HasFieldError(ctx, fc) {
494			ec.Errorf(ctx, "must not be null")
495		}
496		return graphql.Null
497	}
498	res := resTmp.(common.Label)
499	fc.Result = res
500	return ec.marshalNLabel2githubácomágitábugágitábugáentitiesácommonáLabel(ctx, field.Selections, res)
501}
502
503func (ec *executionContext) fieldContext_LabelEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
504	fc = &graphql.FieldContext{
505		Object:     "LabelEdge",
506		Field:      field,
507		IsMethod:   false,
508		IsResolver: false,
509		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
510			switch field.Name {
511			case "name":
512				return ec.fieldContext_Label_name(ctx, field)
513			case "color":
514				return ec.fieldContext_Label_color(ctx, field)
515			}
516			return nil, fmt.Errorf("no field named %q was found under type Label", field.Name)
517		},
518	}
519	return fc, nil
520}
521
522// endregion **************************** field.gotpl *****************************
523
524// region    **************************** input.gotpl *****************************
525
526// endregion **************************** input.gotpl *****************************
527
528// region    ************************** interface.gotpl ***************************
529
530// endregion ************************** interface.gotpl ***************************
531
532// region    **************************** object.gotpl ****************************
533
534var labelImplementors = []string{"Label"}
535
536func (ec *executionContext) _Label(ctx context.Context, sel ast.SelectionSet, obj *common.Label) graphql.Marshaler {
537	fields := graphql.CollectFields(ec.OperationContext, sel, labelImplementors)
538
539	out := graphql.NewFieldSet(fields)
540	deferred := make(map[string]*graphql.FieldSet)
541	for i, field := range fields {
542		switch field.Name {
543		case "__typename":
544			out.Values[i] = graphql.MarshalString("Label")
545		case "name":
546			field := field
547
548			innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
549				defer func() {
550					if r := recover(); r != nil {
551						ec.Error(ctx, ec.Recover(ctx, r))
552					}
553				}()
554				res = ec._Label_name(ctx, field, obj)
555				if res == graphql.Null {
556					atomic.AddUint32(&fs.Invalids, 1)
557				}
558				return res
559			}
560
561			if field.Deferrable != nil {
562				dfs, ok := deferred[field.Deferrable.Label]
563				di := 0
564				if ok {
565					dfs.AddField(field)
566					di = len(dfs.Values) - 1
567				} else {
568					dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
569					deferred[field.Deferrable.Label] = dfs
570				}
571				dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
572					return innerFunc(ctx, dfs)
573				})
574
575				// don't run the out.Concurrently() call below
576				out.Values[i] = graphql.Null
577				continue
578			}
579
580			out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
581		case "color":
582			field := field
583
584			innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
585				defer func() {
586					if r := recover(); r != nil {
587						ec.Error(ctx, ec.Recover(ctx, r))
588					}
589				}()
590				res = ec._Label_color(ctx, field, obj)
591				if res == graphql.Null {
592					atomic.AddUint32(&fs.Invalids, 1)
593				}
594				return res
595			}
596
597			if field.Deferrable != nil {
598				dfs, ok := deferred[field.Deferrable.Label]
599				di := 0
600				if ok {
601					dfs.AddField(field)
602					di = len(dfs.Values) - 1
603				} else {
604					dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
605					deferred[field.Deferrable.Label] = dfs
606				}
607				dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
608					return innerFunc(ctx, dfs)
609				})
610
611				// don't run the out.Concurrently() call below
612				out.Values[i] = graphql.Null
613				continue
614			}
615
616			out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
617		default:
618			panic("unknown field " + strconv.Quote(field.Name))
619		}
620	}
621	out.Dispatch(ctx)
622	if out.Invalids > 0 {
623		return graphql.Null
624	}
625
626	atomic.AddInt32(&ec.deferred, int32(len(deferred)))
627
628	for label, dfs := range deferred {
629		ec.processDeferredGroup(graphql.DeferredGroup{
630			Label:    label,
631			Path:     graphql.GetPath(ctx),
632			FieldSet: dfs,
633			Context:  ctx,
634		})
635	}
636
637	return out
638}
639
640var labelChangeResultImplementors = []string{"LabelChangeResult"}
641
642func (ec *executionContext) _LabelChangeResult(ctx context.Context, sel ast.SelectionSet, obj *bug.LabelChangeResult) graphql.Marshaler {
643	fields := graphql.CollectFields(ec.OperationContext, sel, labelChangeResultImplementors)
644
645	out := graphql.NewFieldSet(fields)
646	deferred := make(map[string]*graphql.FieldSet)
647	for i, field := range fields {
648		switch field.Name {
649		case "__typename":
650			out.Values[i] = graphql.MarshalString("LabelChangeResult")
651		case "label":
652			out.Values[i] = ec._LabelChangeResult_label(ctx, field, obj)
653			if out.Values[i] == graphql.Null {
654				out.Invalids++
655			}
656		case "status":
657			out.Values[i] = ec._LabelChangeResult_status(ctx, field, obj)
658			if out.Values[i] == graphql.Null {
659				out.Invalids++
660			}
661		default:
662			panic("unknown field " + strconv.Quote(field.Name))
663		}
664	}
665	out.Dispatch(ctx)
666	if out.Invalids > 0 {
667		return graphql.Null
668	}
669
670	atomic.AddInt32(&ec.deferred, int32(len(deferred)))
671
672	for label, dfs := range deferred {
673		ec.processDeferredGroup(graphql.DeferredGroup{
674			Label:    label,
675			Path:     graphql.GetPath(ctx),
676			FieldSet: dfs,
677			Context:  ctx,
678		})
679	}
680
681	return out
682}
683
684var labelConnectionImplementors = []string{"LabelConnection"}
685
686func (ec *executionContext) _LabelConnection(ctx context.Context, sel ast.SelectionSet, obj *models.LabelConnection) graphql.Marshaler {
687	fields := graphql.CollectFields(ec.OperationContext, sel, labelConnectionImplementors)
688
689	out := graphql.NewFieldSet(fields)
690	deferred := make(map[string]*graphql.FieldSet)
691	for i, field := range fields {
692		switch field.Name {
693		case "__typename":
694			out.Values[i] = graphql.MarshalString("LabelConnection")
695		case "edges":
696			out.Values[i] = ec._LabelConnection_edges(ctx, field, obj)
697			if out.Values[i] == graphql.Null {
698				out.Invalids++
699			}
700		case "nodes":
701			out.Values[i] = ec._LabelConnection_nodes(ctx, field, obj)
702			if out.Values[i] == graphql.Null {
703				out.Invalids++
704			}
705		case "pageInfo":
706			out.Values[i] = ec._LabelConnection_pageInfo(ctx, field, obj)
707			if out.Values[i] == graphql.Null {
708				out.Invalids++
709			}
710		case "totalCount":
711			out.Values[i] = ec._LabelConnection_totalCount(ctx, field, obj)
712			if out.Values[i] == graphql.Null {
713				out.Invalids++
714			}
715		default:
716			panic("unknown field " + strconv.Quote(field.Name))
717		}
718	}
719	out.Dispatch(ctx)
720	if out.Invalids > 0 {
721		return graphql.Null
722	}
723
724	atomic.AddInt32(&ec.deferred, int32(len(deferred)))
725
726	for label, dfs := range deferred {
727		ec.processDeferredGroup(graphql.DeferredGroup{
728			Label:    label,
729			Path:     graphql.GetPath(ctx),
730			FieldSet: dfs,
731			Context:  ctx,
732		})
733	}
734
735	return out
736}
737
738var labelEdgeImplementors = []string{"LabelEdge"}
739
740func (ec *executionContext) _LabelEdge(ctx context.Context, sel ast.SelectionSet, obj *models.LabelEdge) graphql.Marshaler {
741	fields := graphql.CollectFields(ec.OperationContext, sel, labelEdgeImplementors)
742
743	out := graphql.NewFieldSet(fields)
744	deferred := make(map[string]*graphql.FieldSet)
745	for i, field := range fields {
746		switch field.Name {
747		case "__typename":
748			out.Values[i] = graphql.MarshalString("LabelEdge")
749		case "cursor":
750			out.Values[i] = ec._LabelEdge_cursor(ctx, field, obj)
751			if out.Values[i] == graphql.Null {
752				out.Invalids++
753			}
754		case "node":
755			out.Values[i] = ec._LabelEdge_node(ctx, field, obj)
756			if out.Values[i] == graphql.Null {
757				out.Invalids++
758			}
759		default:
760			panic("unknown field " + strconv.Quote(field.Name))
761		}
762	}
763	out.Dispatch(ctx)
764	if out.Invalids > 0 {
765		return graphql.Null
766	}
767
768	atomic.AddInt32(&ec.deferred, int32(len(deferred)))
769
770	for label, dfs := range deferred {
771		ec.processDeferredGroup(graphql.DeferredGroup{
772			Label:    label,
773			Path:     graphql.GetPath(ctx),
774			FieldSet: dfs,
775			Context:  ctx,
776		})
777	}
778
779	return out
780}
781
782// endregion **************************** object.gotpl ****************************
783
784// region    ***************************** type.gotpl *****************************
785
786func (ec *executionContext) marshalNLabel2githubácomágitábugágitábugáentitiesácommonáLabel(ctx context.Context, sel ast.SelectionSet, v common.Label) graphql.Marshaler {
787	return ec._Label(ctx, sel, &v)
788}
789
790func (ec *executionContext) marshalNLabel2ágithubácomágitábugágitábugáentitiesácommonáLabelá(ctx context.Context, sel ast.SelectionSet, v []common.Label) graphql.Marshaler {
791	ret := make(graphql.Array, len(v))
792	var wg sync.WaitGroup
793	isLen1 := len(v) == 1
794	if !isLen1 {
795		wg.Add(len(v))
796	}
797	for i := range v {
798		i := i
799		fc := &graphql.FieldContext{
800			Index:  &i,
801			Result: &v[i],
802		}
803		ctx := graphql.WithFieldContext(ctx, fc)
804		f := func(i int) {
805			defer func() {
806				if r := recover(); r != nil {
807					ec.Error(ctx, ec.Recover(ctx, r))
808					ret = nil
809				}
810			}()
811			if !isLen1 {
812				defer wg.Done()
813			}
814			ret[i] = ec.marshalNLabel2githubácomágitábugágitábugáentitiesácommonáLabel(ctx, sel, v[i])
815		}
816		if isLen1 {
817			f(i)
818		} else {
819			go f(i)
820		}
821
822	}
823	wg.Wait()
824
825	for _, e := range ret {
826		if e == graphql.Null {
827			return graphql.Null
828		}
829	}
830
831	return ret
832}
833
834func (ec *executionContext) marshalNLabelChangeResult2áágithubácomágitábugágitábugáentitiesábugáLabelChangeResult(ctx context.Context, sel ast.SelectionSet, v []*bug.LabelChangeResult) graphql.Marshaler {
835	ret := make(graphql.Array, len(v))
836	var wg sync.WaitGroup
837	isLen1 := len(v) == 1
838	if !isLen1 {
839		wg.Add(len(v))
840	}
841	for i := range v {
842		i := i
843		fc := &graphql.FieldContext{
844			Index:  &i,
845			Result: &v[i],
846		}
847		ctx := graphql.WithFieldContext(ctx, fc)
848		f := func(i int) {
849			defer func() {
850				if r := recover(); r != nil {
851					ec.Error(ctx, ec.Recover(ctx, r))
852					ret = nil
853				}
854			}()
855			if !isLen1 {
856				defer wg.Done()
857			}
858			ret[i] = ec.marshalOLabelChangeResult2ágithubácomágitábugágitábugáentitiesábugáLabelChangeResult(ctx, sel, v[i])
859		}
860		if isLen1 {
861			f(i)
862		} else {
863			go f(i)
864		}
865
866	}
867	wg.Wait()
868
869	return ret
870}
871
872func (ec *executionContext) unmarshalNLabelChangeStatus2githubácomágitábugágitábugáentitiesábugáLabelChangeStatus(ctx context.Context, v any) (bug.LabelChangeStatus, error) {
873	var res bug.LabelChangeStatus
874	err := res.UnmarshalGQL(v)
875	return res, graphql.ErrorOnPath(ctx, err)
876}
877
878func (ec *executionContext) marshalNLabelChangeStatus2githubácomágitábugágitábugáentitiesábugáLabelChangeStatus(ctx context.Context, sel ast.SelectionSet, v bug.LabelChangeStatus) graphql.Marshaler {
879	return v
880}
881
882func (ec *executionContext) marshalNLabelConnection2githubácomágitábugágitábugáapiágraphqlámodelsáLabelConnection(ctx context.Context, sel ast.SelectionSet, v models.LabelConnection) graphql.Marshaler {
883	return ec._LabelConnection(ctx, sel, &v)
884}
885
886func (ec *executionContext) marshalNLabelConnection2ágithubácomágitábugágitábugáapiágraphqlámodelsáLabelConnection(ctx context.Context, sel ast.SelectionSet, v *models.LabelConnection) graphql.Marshaler {
887	if v == nil {
888		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
889			ec.Errorf(ctx, "the requested element is null which the schema does not allow")
890		}
891		return graphql.Null
892	}
893	return ec._LabelConnection(ctx, sel, v)
894}
895
896func (ec *executionContext) marshalNLabelEdge2áágithubácomágitábugágitábugáapiágraphqlámodelsáLabelEdgeá(ctx context.Context, sel ast.SelectionSet, v []*models.LabelEdge) graphql.Marshaler {
897	ret := make(graphql.Array, len(v))
898	var wg sync.WaitGroup
899	isLen1 := len(v) == 1
900	if !isLen1 {
901		wg.Add(len(v))
902	}
903	for i := range v {
904		i := i
905		fc := &graphql.FieldContext{
906			Index:  &i,
907			Result: &v[i],
908		}
909		ctx := graphql.WithFieldContext(ctx, fc)
910		f := func(i int) {
911			defer func() {
912				if r := recover(); r != nil {
913					ec.Error(ctx, ec.Recover(ctx, r))
914					ret = nil
915				}
916			}()
917			if !isLen1 {
918				defer wg.Done()
919			}
920			ret[i] = ec.marshalNLabelEdge2ágithubácomágitábugágitábugáapiágraphqlámodelsáLabelEdge(ctx, sel, v[i])
921		}
922		if isLen1 {
923			f(i)
924		} else {
925			go f(i)
926		}
927
928	}
929	wg.Wait()
930
931	for _, e := range ret {
932		if e == graphql.Null {
933			return graphql.Null
934		}
935	}
936
937	return ret
938}
939
940func (ec *executionContext) marshalNLabelEdge2ágithubácomágitábugágitábugáapiágraphqlámodelsáLabelEdge(ctx context.Context, sel ast.SelectionSet, v *models.LabelEdge) graphql.Marshaler {
941	if v == nil {
942		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
943			ec.Errorf(ctx, "the requested element is null which the schema does not allow")
944		}
945		return graphql.Null
946	}
947	return ec._LabelEdge(ctx, sel, v)
948}
949
950func (ec *executionContext) marshalOLabelChangeResult2ágithubácomágitábugágitábugáentitiesábugáLabelChangeResult(ctx context.Context, sel ast.SelectionSet, v *bug.LabelChangeResult) graphql.Marshaler {
951	if v == nil {
952		return graphql.Null
953	}
954	return ec._LabelChangeResult(ctx, sel, v)
955}
956
957// endregion ***************************** type.gotpl *****************************