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

Method _Bug_humanId

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

Source from the content-addressed store, hash-verified

572}
573
574func (ec *executionContext) _Bug_humanId(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
575 fc, err := ec.fieldContext_Bug_humanId(ctx, field)
576 if err != nil {
577 return graphql.Null
578 }
579 ctx = graphql.WithFieldContext(ctx, fc)
580 defer func() {
581 if r := recover(); r != nil {
582 ec.Error(ctx, ec.Recover(ctx, r))
583 ret = graphql.Null
584 }
585 }()
586 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
587 ctx = rctx // use context from middleware stack in children
588 return ec.resolvers.Bug().HumanID(rctx, obj)
589 })
590 if err != nil {
591 ec.Error(ctx, err)
592 return graphql.Null
593 }
594 if resTmp == nil {
595 if !graphql.HasFieldError(ctx, fc) {
596 ec.Errorf(ctx, "must not be null")
597 }
598 return graphql.Null
599 }
600 res := resTmp.(string)
601 fc.Result = res
602 return ec.marshalNString2string(ctx, field.Selections, res)
603}
604
605func (ec *executionContext) fieldContext_Bug_humanId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
606 fc = &graphql.FieldContext{

Callers 1

_BugMethod · 0.95

Calls 6

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

Tested by

no test coverage detected