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

Method _Bug_lastEdit

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

Source from the content-addressed store, hash-verified

860}
861
862func (ec *executionContext) _Bug_lastEdit(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
863 fc, err := ec.fieldContext_Bug_lastEdit(ctx, field)
864 if err != nil {
865 return graphql.Null
866 }
867 ctx = graphql.WithFieldContext(ctx, fc)
868 defer func() {
869 if r := recover(); r != nil {
870 ec.Error(ctx, ec.Recover(ctx, r))
871 ret = graphql.Null
872 }
873 }()
874 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
875 ctx = rctx // use context from middleware stack in children
876 return obj.LastEdit(), nil
877 })
878 if err != nil {
879 ec.Error(ctx, err)
880 return graphql.Null
881 }
882 if resTmp == nil {
883 if !graphql.HasFieldError(ctx, fc) {
884 ec.Errorf(ctx, "must not be null")
885 }
886 return graphql.Null
887 }
888 res := resTmp.(time.Time)
889 fc.Result = res
890 return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
891}
892
893func (ec *executionContext) fieldContext_Bug_lastEdit(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
894 fc = &graphql.FieldContext{

Callers 1

_BugMethod · 0.95

Calls 5

ErrorfMethod · 0.80
LastEditMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected