mirror of
https://github.com/graphql-python/graphene-django.git
synced 2024-11-23 01:57:08 +03:00
Merge pull request #278 from devbis/patch-1
Access to batch endpoint without parameters fixed
This commit is contained in:
commit
14dca8297d
|
@ -108,12 +108,9 @@ class GraphQLView(View):
|
||||||
request, data)
|
request, data)
|
||||||
|
|
||||||
if self.batch:
|
if self.batch:
|
||||||
responses = [self.get_response(
|
responses = [self.get_response(request, entry) for entry in data]
|
||||||
request, entry) for entry in data]
|
result = '[{}]'.format(','.join([response[0] for response in responses]))
|
||||||
result = '[{}]'.format(
|
status_code = responses and max(responses, key=lambda response: response[1])[1] or 200
|
||||||
','.join([response[0] for response in responses]))
|
|
||||||
status_code = max(
|
|
||||||
responses, key=lambda response: response[1])[1]
|
|
||||||
else:
|
else:
|
||||||
result, status_code = self.get_response(
|
result, status_code = self.get_response(
|
||||||
request, data, show_graphiql)
|
request, data, show_graphiql)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user