graphql-python / graphql-core-legacy

GraphQL base implementation for Python (legacy version – see graphql-core for the current one)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Executing a GraphQL query containing types crashes

NyanKiyoshi opened this issue · comments

If we run for example the following query:

type MyType {
}

The graphql-core will crash with the following stack trace:

  File "graphql/error/format_error.py", line 17, in format_error
    if error.locations is not None:
  File "graphql/error/base.py", line 80, in locations
    source = self.source
  File "graphql/error/base.py", line 54, in source
    node = self.nodes[0]

Thank you for the bug report and pull request.