diff --git a/resolvers/author.py b/resolvers/author.py index 44255016..e4a53780 100644 --- a/resolvers/author.py +++ b/resolvers/author.py @@ -178,7 +178,7 @@ async def get_author_follows(_, _info, slug="", user=None, author_id=0): elif author_id: author_query = author_query.filter(Author.id == author_id) else: - raise ValueError("One of slug, user, or author_id must be provided") + return {"error": "One of slug, user, or author_id must be provided"} result = local_session().execute(author_query) if result: # logger.debug(result) diff --git a/schema/query.graphql b/schema/query.graphql index ca521f90..ab83a8b1 100644 --- a/schema/query.graphql +++ b/schema/query.graphql @@ -14,7 +14,7 @@ type Query { get_shout_followers(slug: String, shout_id: Int): [Author] get_topic_followers(slug: String, topic_id: Int): [Author] get_author_followers(slug: String, user: String, author_id: Int): [Author] - get_author_follows(slug: String, user: String, author_id: Int): AuthorFollowsResult! + get_author_follows(slug: String, user: String, author_id: Int): CommonResult! get_author_follows_topics(slug: String, user: String, author_id: Int): [Topic] get_author_follows_authors(slug: String, user: String, author_id: Int): [Author] load_shouts_followed(follower_id: Int!, limit: Int, offset: Int): [Shout] # userReactedShouts