From bf8848bd756e2fadc623443f08debc4019c4b5df Mon Sep 17 00:00:00 2001 From: tonyrewin Date: Fri, 14 Oct 2022 21:15:04 +0300 Subject: [PATCH] caching-unlimited --- resolvers/reactions.py | 17 ----------------- schema.graphql | 1 - 2 files changed, 18 deletions(-) diff --git a/resolvers/reactions.py b/resolvers/reactions.py index 81c48cb5..7d14cf4d 100644 --- a/resolvers/reactions.py +++ b/resolvers/reactions.py @@ -122,23 +122,6 @@ async def delete_reaction(_, info, rid): return {} -@query.field("reactionsByShout") -async def get_shout_reactions(_, info, slug, offset, limit): - reactions = [] - with local_session() as session: - reactions = ( - session.query(Reaction) - .filter(Reaction.shout == slug) - .limit(limit) - .offset(offset) - .all() - ) - for r in reactions: - r.stat = await get_reaction_stat(r.id) - r.createdBy = await UserStorage.get_user(r.createdBy or "discours") - return reactions - - @query.field("reactionsForShouts") async def get_reactions_for_shouts(_, info, shouts, offset, limit): reactions = [] diff --git a/schema.graphql b/schema.graphql index 4017b5fb..54c70523 100644 --- a/schema.graphql +++ b/schema.graphql @@ -247,7 +247,6 @@ type Query { # reactons reactionsByAuthor(slug: String!, offset: Int!, limit: Int!): [Reaction]! - reactionsByShout(slug: String!, offset: Int!, limit: Int!): [Reaction]! reactionsForShouts(shouts: [String]!, offset: Int!, limit: Int!): [Reaction]! # collab