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

Method _Identity_name

api/graphql/graph/identity.generated.go:125–151  ·  view source on GitHub ↗
(ctx context.Context, field graphql.CollectedField, obj models.IdentityWrapper)

Source from the content-addressed store, hash-verified

123}
124
125func (ec *executionContext) _Identity_name(ctx context.Context, field graphql.CollectedField, obj models.IdentityWrapper) (ret graphql.Marshaler) {
126 fc, err := ec.fieldContext_Identity_name(ctx, field)
127 if err != nil {
128 return graphql.Null
129 }
130 ctx = graphql.WithFieldContext(ctx, fc)
131 defer func() {
132 if r := recover(); r != nil {
133 ec.Error(ctx, ec.Recover(ctx, r))
134 ret = graphql.Null
135 }
136 }()
137 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
138 ctx = rctx // use context from middleware stack in children
139 return obj.Name(), nil
140 })
141 if err != nil {
142 ec.Error(ctx, err)
143 return graphql.Null
144 }
145 if resTmp == nil {
146 return graphql.Null
147 }
148 res := resTmp.(string)
149 fc.Result = res
150 return ec.marshalOString2string(ctx, field.Selections, res)
151}
152
153func (ec *executionContext) fieldContext_Identity_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
154 fc = &graphql.FieldContext{

Callers 1

_IdentityMethod · 0.95

Calls 4

marshalOString2stringMethod · 0.95
NameMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected