Skip to content

Commit

Permalink
Fixed assertion errors
Browse files Browse the repository at this point in the history
  • Loading branch information
syrusakbary committed Mar 19, 2017
1 parent 330a59f commit 9cbe59b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion flask_graphql/graphqlview.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@ def dispatch_request(self):
only_allow_query = request_method == 'get'

if not is_batch:
assert isinstance(data, dict), "GraphQL params should be a dict. Received {}.".format(data)
if not isinstance(data, dict):
raise HttpQueryError(
400,
'GraphQL params should be a dict. Received {}.'.format(data)
)
data = dict(data, **request.args.to_dict())
data = [data]
elif not self.batch:
Expand Down

0 comments on commit 9cbe59b

Please sign in to comment.