Skip to content

GitHub API: Server did not return a GraphQL result #149

Closed
@BElluu

Description

@BElluu

Hello,

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions