From 1cc248dca46aa0f9d1f2294add6a4b535d9c7aae Mon Sep 17 00:00:00 2001 From: Untone Date: Sat, 30 Oct 2021 20:29:52 +0300 Subject: [PATCH] topics by author todo --- resolvers/topics.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resolvers/topics.py b/resolvers/topics.py index 05fda722..6b1aaea6 100644 --- a/resolvers/topics.py +++ b/resolvers/topics.py @@ -22,7 +22,9 @@ async def topics_by_community(_, info, community): async def topics_by_author(_, info, author): topics = [] with local_session() as session: - topics = session.query(Topic).filter(Topic.community == community) + author_shouts = session.query(Shout).filter(author in Shout.authors) + # TODO: all the topics from author_shouts + topics = [] return topics @mutation.field("topicSubscribe")