【发布时间】:2019-08-25 07:39:07
【问题描述】:
Here 是一个 graphql 查询,其结果是:OK。
我尝试使用 Python 获得相同的结果,但我什么也没得到:response.text 为空。 (不需要 API 密钥)。
q = """
{
node(id: "UXVlc3Rpb25uYWlyZTo5NTNjYjdjYS0xY2E0LTExZTktOTRkMi1mYTE2M2VlYjExZTE=") {
... on Questionnaire {
replies(first: 10, after: null) {
totalCount
pageInfo {
hasNextPage
endCursor
}
edges {
node {
id
createdAt
publishedAt
updatedAt
author {
id
}
responses {
question {
title
}
... on ValueResponse {
value
}
}
}
}
}
}
}
}
"""
response = requests.post(url = "https://granddebat.fr/graphql" , json = {'query': q})
print(response.text)
请问有什么办法吗?
【问题讨论】: