diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 6dec1d3d..77cef009 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,8 @@ +[0.4.4] +- followers_stat removed +- sqlite3 support added +- rating_stat and commented_stat fix + [0.4.3] - cache reimplemented - load shouts queries unified diff --git a/pyproject.toml b/pyproject.toml index fe8ac35b..a8500fee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "core" -version = "0.4.3" +version = "0.4.4" description = "core module for discours.io" authors = ["discoursio devteam"] license = "MIT" diff --git a/resolvers/reader.py b/resolvers/reader.py index f720556b..f34f46e3 100644 --- a/resolvers/reader.py +++ b/resolvers/reader.py @@ -88,7 +88,7 @@ def query_shouts(slug=None): func.count(aliased_reaction.id) .filter(aliased_reaction.kind == ReactionKind.COMMENT.value) .label("comments_stat"), - func.count(ShoutReactionsFollower.follower).label("followers_stat"), + # func.count(ShoutReactionsFollower.follower).label("followers_stat"), func.sum( case( (aliased_reaction.kind == ReactionKind.LIKE.value, 1), @@ -177,12 +177,22 @@ def get_shouts_with_stats(q, limit, offset=0, author_id=None): # Формирование списка публикаций с их данными shouts = [] - for shout, comments_stat, followers_stat, rating_stat, last_reacted_at, authors, topics, main_topic_slug in results: + + for [ + shout, + comments_stat, + # followers_stat, + rating_stat, + last_reacted_at, + authors, + topics, + main_topic_slug, + ] in results: shout.authors = parse_aggregated_string(authors, Author) shout.topics = parse_aggregated_string(topics, Topic) shout.stat = { "viewed": ViewedStorage.get_shout(shout.id), - "followed": followers_stat or 0, + # "followed": followers_stat or 0, "rating": rating_stat or 0, "commented": comments_stat or 0, "last_reacted_at": last_reacted_at, @@ -288,7 +298,7 @@ async def get_shout(_, info, slug: str): [ shout, commented_stat, - followers_stat, + # followers_stat, rating_stat, last_reaction_at, authors, diff --git a/schema/type.graphql b/schema/type.graphql index 3ced0a03..5bb56531 100644 --- a/schema/type.graphql +++ b/schema/type.graphql @@ -95,7 +95,7 @@ type Stat { rating: Int commented: Int viewed: Int - followed: Int + # followed: Int last_reacted_at: Int }