From 473f3a5a32522cb692090232534971e3f409c869 Mon Sep 17 00:00:00 2001 From: Untone Date: Fri, 13 Oct 2023 14:29:36 +0300 Subject: [PATCH] core-query-format-fix3 --- services/core.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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,