diff --git a/resolvers/follower.py b/resolvers/follower.py index 9cafb693..5a37a5e9 100644 --- a/resolvers/follower.py +++ b/resolvers/follower.py @@ -50,10 +50,10 @@ def get_entity_field_name(entity_type: str) -> str: ValueError: Unknown entity_type: invalid """ entity_field_mapping = { - "author": "following", # AuthorFollower.following -> Author - "topic": "topic", # TopicFollower.topic -> Topic + "author": "following", # AuthorFollower.following -> Author + "topic": "topic", # TopicFollower.topic -> Topic "community": "community", # CommunityFollower.community -> Community - "shout": "shout", # ShoutReactionsFollower.shout -> Shout + "shout": "shout" # ShoutReactionsFollower.shout -> Shout } if entity_type not in entity_field_mapping: msg = f"Unknown entity_type: {entity_type}" @@ -64,7 +64,11 @@ def get_entity_field_name(entity_type: str) -> str: @mutation.field("follow") @login_required async def follow( - _: None, info: GraphQLResolveInfo, what: str, slug: str = "", entity_id: int | None = None + _: None, + info: GraphQLResolveInfo, + what: str, + slug: str = "", + entity_id: int | None = None ) -> dict[str, Any]: """ GraphQL мутация для создания подписки на автора, тему, сообщество или публикацию. @@ -266,7 +270,11 @@ async def follow( @mutation.field("unfollow") @login_required async def unfollow( - _: None, info: GraphQLResolveInfo, what: str, slug: str = "", entity_id: int | None = None + _: None, + info: GraphQLResolveInfo, + what: str, + slug: str = "", + entity_id: int | None = None ) -> dict[str, Any]: """ GraphQL мутация для отмены подписки на автора, тему, сообщество или публикацию.