MCPcopy Create free account
hub / github.com/git-bug/git-bug / _Label

Method _Label

api/graphql/graph/label.generated.go:536–638  ·  view source on GitHub ↗
(ctx context.Context, sel ast.SelectionSet, obj *common.Label)

Source from the content-addressed store, hash-verified

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 }

Calls 4

_Label_nameMethod · 0.95
_Label_colorMethod · 0.95
processDeferredGroupMethod · 0.95
ErrorMethod · 0.45

Tested by

no test coverage detected