diff --git a/services/core.py b/services/core.py index 0b3d366..bac740e 100644 --- a/services/core.py +++ b/services/core.py @@ -9,7 +9,7 @@ headers = {"Content-Type": "application/json"} async def get_author(author_id): gql = { - "query": "query GetAuthorById { getAuthorById(author_id: $author_id) { id slug userpic name lastSeen } }", + "query": "query GetAuthorById($author_id: Int!) { getAuthorById(author_id: $author_id) { id slug userpic name lastSeen } }", "operation": "GetAuthorById", "variables": {"author_id": author_id} } @@ -28,7 +28,7 @@ async def get_author(author_id): async def get_network(author_id:int, limit:int = 50, offset:int = 0) -> list: gql = { - "query": "query LoadAuthors { authorFollowings(author_id: $author_id, limit: $limit, offset: $offset) { id slug userpic name } }", + "query": "query LoadAuthors($author_id: Int!, $limit: Int, $offset: Int) { authorFollowings(author_id: $author_id, limit: $limit, offset: $offset) { id slug userpic name } }", "operation": "LoadAuthors", "variables": { "author_id": author_id, @@ -59,7 +59,7 @@ async def get_network(author_id:int, limit:int = 50, offset:int = 0) -> list: async def get_followers(author_id, amount): gql = { - "query": "query LoadAuthors { authorFollowers(author_id: $author_id, limit: $limit) { id slug userpic name } }", + "query": "query LoadAuthors($author_id: Int!, $limit: Int, $offset: Int) { authorFollowers(author_id: $author_id, limit: $limit) { id slug userpic name } }", "operation": "LoadAuthors", "variables": { "author_id": author_id,