core-query-format-fix3

This commit is contained in:
Untone 2023-10-13 14:29:36 +03:00
parent 9c6f704c7c
commit 473f3a5a32

View File

@ -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,