mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-02-13 18:10:36 +03:00
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:
parent
eb02f8781c
commit
8eb881e085
|
@ -282,6 +282,8 @@ class GraphQLView(View):
|
||||||
raise HttpError(HttpResponseBadRequest('Variables are invalid JSON.'))
|
raise HttpError(HttpResponseBadRequest('Variables are invalid JSON.'))
|
||||||
|
|
||||||
operation_name = request.GET.get('operationName') or data.get('operationName')
|
operation_name = request.GET.get('operationName') or data.get('operationName')
|
||||||
|
if operation_name == "null":
|
||||||
|
operation_name = None
|
||||||
|
|
||||||
return query, variables, operation_name, id
|
return query, variables, operation_name, id
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user