GitHub API: Server did not return a GraphQL result
See original GitHub issueHello,
I want to get some information from Github API. I using your gql. When I do simple request I got “Server did not return a GraphQL result”. Do you have any idea what I doing wrong?
from gql import gql, Client, AIOHTTPTransport
URL = "https://api.github.com/graphql"
transport = AIOHTTPTransport(url=URL, headers={'Authorization': 'MY_TOKEN'})
client = Client(transport=transport, fetch_schema_from_transport=True)
query = gql('''
query {
search(query: "test", type: ISSUE, first: 20) {
nodes {
... on Issue {
id
bodyHTML
title
url
closed
}
}
}
}
''')
result = client.execute(query)
print(result)
venv/lib/python3.8/site-packages/gql/transport/aiohttp.py", line 161, in execute raise TransportProtocolError(“Server did not return a GraphQL result”) gql.transport.exceptions.TransportProtocolError: Server did not return a GraphQL result
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
GraphQL query does not return result · Discussion #128 - GitHub
My localhost server returns the response 200. When I use Query Inspector to discover the query, it still keeps loading. Therefore, it returns...
Read more >Forming calls with GraphQL - GitHub Docs
GraphQL queries return only the data you specify. To form a query, you must specify fields within fields (also known as nested subfields)...
Read more >Can I do any action just after return my response with an API ...
Summary I am trying to perform an action right after returning my response to a GraphQL API request. Let me explain: I would...
Read more >GraphQL API - GitHub Docs
GraphQL API. To create integrations, retrieve data, and automate your workflows, use the GitHub GraphQL API. The GitHub GraphQL API offers more precise...
Read more >Queries returning only errors are forced to be a 500 · Issue #427
On commit b3ccce9 a query response containing only the errors field is forced to be a 500, however these errors could easily be...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Note: I created a token to test this and now this works for me with your code.
The only modification I made is to add “bearer” before the token:
transport = AIOHTTPTransport(url=URL, headers={'Authorization': 'bearer MY_TOKEN'})
With PR #155 the message should be more clear: