few-more-resolvers-fix
This commit is contained in:
parent
85a9077792
commit
31824cccc9
|
@ -14,6 +14,10 @@ from resolvers.profile import (
|
||||||
rate_user,
|
rate_user,
|
||||||
update_profile,
|
update_profile,
|
||||||
get_authors_all,
|
get_authors_all,
|
||||||
|
get_followed_authors2,
|
||||||
|
get_followed_authors,
|
||||||
|
get_author,
|
||||||
|
get_author_by_id
|
||||||
)
|
)
|
||||||
|
|
||||||
from resolvers.topics import (
|
from resolvers.topics import (
|
||||||
|
@ -52,6 +56,10 @@ __all__ = [
|
||||||
"rate_user",
|
"rate_user",
|
||||||
"update_profile",
|
"update_profile",
|
||||||
"get_authors_all",
|
"get_authors_all",
|
||||||
|
"get_followed_authors2",
|
||||||
|
"get_followed_authors",
|
||||||
|
"get_author",
|
||||||
|
"get_author_by_id",
|
||||||
# load
|
# load
|
||||||
"load_shout",
|
"load_shout",
|
||||||
"load_shouts_by",
|
"load_shouts_by",
|
||||||
|
|
|
@ -142,6 +142,7 @@ async def get_followed_authors(_, _info, slug) -> List[User]:
|
||||||
|
|
||||||
return await followed_authors(user_id)
|
return await followed_authors(user_id)
|
||||||
|
|
||||||
|
|
||||||
@query.field("authorFollowedAuthors")
|
@query.field("authorFollowedAuthors")
|
||||||
async def get_followed_authors2(_, info, author_id) -> List[User]:
|
async def get_followed_authors2(_, info, author_id) -> List[User]:
|
||||||
return await followed_authors(author_id)
|
return await followed_authors(author_id)
|
||||||
|
@ -266,7 +267,7 @@ async def get_authors_all(_, _info):
|
||||||
|
|
||||||
|
|
||||||
@query.field("getAuthorById")
|
@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 = select(User).where(User.id == author_id)
|
||||||
q = add_author_stat_columns(q)
|
q = add_author_stat_columns(q)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user