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

Method _Identity_id

api/graphql/graph/identity.generated.go:37–66  ·  view source on GitHub ↗

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

(ctx context.Context, field graphql.CollectedField, obj models.IdentityWrapper)

Source from the content-addressed store, hash-verified

35// region **************************** field.gotpl *****************************
36
37func (ec *executionContext) _Identity_id(ctx context.Context, field graphql.CollectedField, obj models.IdentityWrapper) (ret graphql.Marshaler) {
38 fc, err := ec.fieldContext_Identity_id(ctx, field)
39 if err != nil {
40 return graphql.Null
41 }
42 ctx = graphql.WithFieldContext(ctx, fc)
43 defer func() {
44 if r := recover(); r != nil {
45 ec.Error(ctx, ec.Recover(ctx, r))
46 ret = graphql.Null
47 }
48 }()
49 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
50 ctx = rctx // use context from middleware stack in children
51 return obj.Id(), nil
52 })
53 if err != nil {
54 ec.Error(ctx, err)
55 return graphql.Null
56 }
57 if resTmp == nil {
58 if !graphql.HasFieldError(ctx, fc) {
59 ec.Errorf(ctx, "must not be null")
60 }
61 return graphql.Null
62 }
63 res := resTmp.(entity.Id)
64 fc.Result = res
65 return ec.marshalNID2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐId(ctx, field.Selections, res)
66}
67
68func (ec *executionContext) fieldContext_Identity_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
69 fc = &graphql.FieldContext{

Callers 1

_IdentityMethod · 0.95

Calls 5

ErrorfMethod · 0.80
IdMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected