diff --git a/services/core.py b/services/core.py index feb7857..be981ff 100644 --- a/services/core.py +++ b/services/core.py @@ -9,8 +9,8 @@ headers = {"Content-Type": "application/json"} async def get_author(author_id): gql = { - "query": "query GetAuthor { getAuthor(author_id: Int!) { id slug userpic name lastSeen } }", - "operation": "GetAuthor", + "query": "query GetAuthorById { getAuthorById(author_id: Int!) { id slug userpic name lastSeen } }", + "operation": "GetAuthorById", "variables": {"author_id": author_id} } try: @@ -20,7 +20,7 @@ async def get_author(author_id): return None r = response.json() print(f"[services.core] got author: {r}") - author = r.get("data", {}).get("getAuthor") + author = r.get("data", {}).get("getAuthorbyId") return author except Exception: return None