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

Method _Identity_humanId

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

Source from the content-addressed store, hash-verified

79}
80
81func (ec *executionContext) _Identity_humanId(ctx context.Context, field graphql.CollectedField, obj models.IdentityWrapper) (ret graphql.Marshaler) {
82 fc, err := ec.fieldContext_Identity_humanId(ctx, field)
83 if err != nil {
84 return graphql.Null
85 }
86 ctx = graphql.WithFieldContext(ctx, fc)
87 defer func() {
88 if r := recover(); r != nil {
89 ec.Error(ctx, ec.Recover(ctx, r))
90 ret = graphql.Null
91 }
92 }()
93 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
94 ctx = rctx // use context from middleware stack in children
95 return ec.resolvers.Identity().HumanID(rctx, obj)
96 })
97 if err != nil {
98 ec.Error(ctx, err)
99 return graphql.Null
100 }
101 if resTmp == nil {
102 if !graphql.HasFieldError(ctx, fc) {
103 ec.Errorf(ctx, "must not be null")
104 }
105 return graphql.Null
106 }
107 res := resTmp.(string)
108 fc.Result = res
109 return ec.marshalNString2string(ctx, field.Selections, res)
110}
111
112func (ec *executionContext) fieldContext_Identity_humanId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
113 fc = &graphql.FieldContext{

Callers 1

_IdentityMethod · 0.95

Calls 6

marshalNString2stringMethod · 0.95
ErrorfMethod · 0.80
HumanIDMethod · 0.65
IdentityMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected