few-more-resolvers-fix

This commit is contained in:
Untone 2023-10-13 13:45:27 +03:00
parent 85a9077792
commit 31824cccc9
2 changed files with 10 additions and 1 deletions

View File

@ -14,6 +14,10 @@ from resolvers.profile import (
rate_user,
update_profile,
get_authors_all,
get_followed_authors2,
get_followed_authors,
get_author,
get_author_by_id
)
from resolvers.topics import (
@ -52,6 +56,10 @@ __all__ = [
"rate_user",
"update_profile",
"get_authors_all",
"get_followed_authors2",
"get_followed_authors",
"get_author",
"get_author_by_id",
# load
"load_shout",
"load_shouts_by",

View File

@ -142,6 +142,7 @@ async def get_followed_authors(_, _info, slug) -> List[User]:
return await followed_authors(user_id)
@query.field("authorFollowedAuthors")
async def get_followed_authors2(_, info, author_id) -> List[User]:
return await followed_authors(author_id)
@ -266,7 +267,7 @@ async def get_authors_all(_, _info):
@query.field("getAuthorById")
async def get_author(_, _info, author_id):
async def get_author_by_id(_, _info, author_id):
q = select(User).where(User.id == author_id)
q = add_author_stat_columns(q)