MCPcopy Index your code
hub / github.com/git-bug/git-bug / _Bug_author

Method _Bug_author

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

Source from the content-addressed store, hash-verified

754}
755
756func (ec *executionContext) _Bug_author(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
757 fc, err := ec.fieldContext_Bug_author(ctx, field)
758 if err != nil {
759 return graphql.Null
760 }
761 ctx = graphql.WithFieldContext(ctx, fc)
762 defer func() {
763 if r := recover(); r != nil {
764 ec.Error(ctx, ec.Recover(ctx, r))
765 ret = graphql.Null
766 }
767 }()
768 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
769 ctx = rctx // use context from middleware stack in children
770 return obj.Author()
771 })
772 if err != nil {
773 ec.Error(ctx, err)
774 return graphql.Null
775 }
776 if resTmp == nil {
777 if !graphql.HasFieldError(ctx, fc) {
778 ec.Errorf(ctx, "must not be null")
779 }
780 return graphql.Null
781 }
782 res := resTmp.(models.IdentityWrapper)
783 fc.Result = res
784 return ec.marshalNIdentity2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
785}
786
787func (ec *executionContext) fieldContext_Bug_author(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
788 fc = &graphql.FieldContext{

Callers 1

_BugMethod · 0.95

Tested by

no test coverage detected