Fix graphiql refreshing operationName undefined

operationName is serialized into the query string as a string. When getting the query value for operationName, we need to convert string "null" into None.
This commit is contained in:
Kuan 2017-04-13 10:11:10 -07:00 committed by GitHub
parent eb02f8781c
commit 8eb881e085

View File

@ -282,6 +282,8 @@ class GraphQLView(View):
raise HttpError(HttpResponseBadRequest('Variables are invalid JSON.'))
operation_name = request.GET.get('operationName') or data.get('operationName')
if operation_name == "null":
operation_name = None
return query, variables, operation_name, id