Fail to decode unicode payloads
varuna82 opened this issue · comments
varuna commented
GraphQL requests that contain unicode characters fails with the error message 'POST body sent invalid JSON.'
I was able to fix it by adding utf-8 parameter to decode method .
graphqlview.py L132:
request_json = json.loads(request.data.decode('utf-8'))
varuna commented
This is already fixed in master branch of the git repo. However pip seem to have an older version yet.
Martin Fous commented
Hello guys,
I playing with GraphQL and I received this exception AttributeError str' object has no attribute 'decode' with python 3.
I'd like to propose distinction between 'str' and 'unicode' in GraphQLView class function parse_body()