From 427e700a305ef9f77f9a900b28f059f1af21974f Mon Sep 17 00:00:00 2001 From: tonyrewin Date: Fri, 30 Sep 2022 11:48:38 +0300 Subject: [PATCH] fix0async --- resolvers/profile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resolvers/profile.py b/resolvers/profile.py index 54c2f012..46fab04d 100644 --- a/resolvers/profile.py +++ b/resolvers/profile.py @@ -184,12 +184,13 @@ def author_unfollow(user, slug): @query.field("authorsAll") -def get_authors_all(_, _info): +async def get_authors_all(_, _info): authors = await UserStorage.get_all_users() for author in authors: author.stat = await get_author_stat(author.slug) return authors + @query.field("topAuthors") def get_top_authors(_, _info, offset, limit): return list(UserStorage.get_top_users())[offset : offset + limit] # type: ignore