caching-unlimited

This commit is contained in:
tonyrewin 2022-10-14 21:15:04 +03:00
parent e96227fb0c
commit bf8848bd75
2 changed files with 0 additions and 18 deletions

View File

@ -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 = []

View File

@ -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