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

Method _Bug_title

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

Source from the content-addressed store, hash-verified

660}
661
662func (ec *executionContext) _Bug_title(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
663 fc, err := ec.fieldContext_Bug_title(ctx, field)
664 if err != nil {
665 return graphql.Null
666 }
667 ctx = graphql.WithFieldContext(ctx, fc)
668 defer func() {
669 if r := recover(); r != nil {
670 ec.Error(ctx, ec.Recover(ctx, r))
671 ret = graphql.Null
672 }
673 }()
674 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
675 ctx = rctx // use context from middleware stack in children
676 return obj.Title(), nil
677 })
678 if err != nil {
679 ec.Error(ctx, err)
680 return graphql.Null
681 }
682 if resTmp == nil {
683 if !graphql.HasFieldError(ctx, fc) {
684 ec.Errorf(ctx, "must not be null")
685 }
686 return graphql.Null
687 }
688 res := resTmp.(string)
689 fc.Result = res
690 return ec.marshalNString2string(ctx, field.Selections, res)
691}
692
693func (ec *executionContext) fieldContext_Bug_title(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
694 fc = &graphql.FieldContext{

Callers 1

_BugMethod · 0.95

Calls 5

marshalNString2stringMethod · 0.95
ErrorfMethod · 0.80
TitleMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected