GraphQL-python-archive / graphql-django-view

[DEPRECATED | Use graphene-django package] A django view that will execute a GraphQLSchema using a given Executor.
http://graphene-python.org/
MIT License
23 stars 7 forks source link

No support for unicode characters if json content-type #3

Open kszeluk opened 8 years ago

kszeluk commented 8 years ago
        elif content_type == 'application/json':
            try:
                request_json = json.loads(request.body.decode())
                assert isinstance(request_json, dict)
                return request_json
            except:
                raise HttpError(HttpResponseBadRequest('POST body sent invalid JSON.'))

i believe this code should be refactored