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

Method _Label_name

api/graphql/graph/label.generated.go:40–69  ·  view source on GitHub ↗

endregion ************************** generated!.gotpl ************************** region ***************************** args.gotpl ***************************** endregion ***************************** args.gotpl ***************************** region ************************** directives.gotpl ***

(ctx context.Context, field graphql.CollectedField, obj *common.Label)

Source from the content-addressed store, hash-verified

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{

Callers 1

_LabelMethod · 0.95

Calls 6

marshalNString2stringMethod · 0.95
ErrorfMethod · 0.80
NameMethod · 0.65
LabelMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected