diff --git a/internal/http/graph/generated.go b/internal/http/graph/generated.go index a42fc7f..0ad85ed 100644 --- a/internal/http/graph/generated.go +++ b/internal/http/graph/generated.go @@ -399,7 +399,6 @@ type MutationResolver interface { MarkAllLikeNotificationsAsRead(ctx context.Context) (*MarkLikeNotificationReadResult, error) } type PostResolver interface { - Author(ctx context.Context, obj *domain.Post) (*domain.User, error) CommentsCount(ctx context.Context, obj *domain.Post) (int, error) Likes(ctx context.Context, obj *domain.Post) ([]*domain.Like, error) LikesCount(ctx context.Context, obj *domain.Post) (int, error) @@ -8752,7 +8751,7 @@ func (ec *executionContext) _Post_author(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Post().Author(rctx, obj) + return obj.Author, nil }) if err != nil { ec.Error(ctx, err) @@ -8773,8 +8772,8 @@ func (ec *executionContext) fieldContext_Post_author(_ context.Context, field gr fc = &graphql.FieldContext{ Object: "Post", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "id": @@ -16778,41 +16777,10 @@ func (ec *executionContext) _Post(ctx context.Context, sel ast.SelectionSet, obj atomic.AddUint32(&out.Invalids, 1) } case "author": - field := field - - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - } - }() - res = ec._Post_author(ctx, field, obj) - if res == graphql.Null { - atomic.AddUint32(&fs.Invalids, 1) - } - return res + out.Values[i] = ec._Post_author(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) } - - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) - }) - - // don't run the out.Concurrently() call below - out.Values[i] = graphql.Null - continue - } - - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) case "commentsCount": field := field