diff --git a/services/core.py b/services/core.py index fb84874..f1f99c3 100644 --- a/services/core.py +++ b/services/core.py @@ -64,20 +64,10 @@ async def get_my_followed() -> List[ChatMember]: async def get_author(user: str = ""): query_name = "get_author_id" - query_type = "query" operation = "GetAuthorId" - query_fields = "id slug pic name" gql = { - "query": query_type - + "(user: $user) " - + operation - + "($user: String!) { " - + query_name - + " { " - + query_fields - + "} " - + " }", + "query": f"query {operation}($user: String!) {{ {query_name}(user: $user) {{ id slug pic name }} }}", "operationName": operation, "variables": {"user": user}, }