core-query-format-fix

This commit is contained in:
Untone 2023-10-13 14:19:18 +03:00
parent efa3ecb174
commit a0fd78566b

View File

@ -9,7 +9,7 @@ headers = {"Content-Type": "application/json"}
async def get_author(author_id):
gql = {
"query": "query GetAuthorById { getAuthorById(author_id: Int!) { id slug userpic name lastSeen } }",
"query": "query GetAuthorById { 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, limit=50, offset=0) -> list:
gql = {
"query": "query LoadAuthors { authorFollowings(author_id: Int!, limit: Int, offset: Int) { id slug userpic name } }",
"query": "query LoadAuthors { 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, limit=50, offset=0) -> list:
async def get_followers(author_id, amount):
gql = {
"query": "query LoadAuthors { authorFollowers(author_id: Int!, limit: Int) { id slug userpic name } }",
"query": "query LoadAuthors { authorFollowers(author_id: $author_id, limit: $limit) { id slug userpic name } }",
"operation": "LoadAuthors",
"variables": {
"author_id": author_id,