graphene
graphene copied to clipboard
Cannot recognize query whose operation name contains space
I met a query whose operation name contains space
schema = Schema(query=Query)
result = schema.execute(
'''
query user login ($un: String, $pw: String) {
r: User (username: $un, password: $pw) {
id, username, token
}
}
''',
variables={'un': "test", 'pw': "123"}
)
print(result.data)
This code printed out None.
But if I remove this space, everything works fine. I wonder if it is graphene itself issue.
http://spec.graphql.org/draft/#sec-Names Spaces are not allowed in GraphQL names.
But there should be an error in result.errors!