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

Method _Bug_labels

api/graphql/graph/bug.generated.go:706–735  ·  view source on GitHub ↗
(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper)

Source from the content-addressed store, hash-verified

704}
705
706func (ec *executionContext) _Bug_labels(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
707 fc, err := ec.fieldContext_Bug_labels(ctx, field)
708 if err != nil {
709 return graphql.Null
710 }
711 ctx = graphql.WithFieldContext(ctx, fc)
712 defer func() {
713 if r := recover(); r != nil {
714 ec.Error(ctx, ec.Recover(ctx, r))
715 ret = graphql.Null
716 }
717 }()
718 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
719 ctx = rctx // use context from middleware stack in children
720 return obj.Labels(), nil
721 })
722 if err != nil {
723 ec.Error(ctx, err)
724 return graphql.Null
725 }
726 if resTmp == nil {
727 if !graphql.HasFieldError(ctx, fc) {
728 ec.Errorf(ctx, "must not be null")
729 }
730 return graphql.Null
731 }
732 res := resTmp.([]common.Label)
733 fc.Result = res
734 return ec.marshalNLabel2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋcommonᚐLabelᚄ(ctx, field.Selections, res)
735}
736
737func (ec *executionContext) fieldContext_Bug_labels(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
738 fc = &graphql.FieldContext{

Callers 1

_BugMethod · 0.95

Tested by

no test coverage detected