8000 Fixed assertion errors · graphql-python/flask-graphql@9cbe59b · GitHub
[go: up one dir, main page]

Skip to content
Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9cbe59b

Browse files
committed
Fixed assertion errors
1 parent 330a59f commit 9cbe59b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

flask_graphql/graphqlview.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,11 @@ def dispatch_request(self):
9595
only_allow_query = request_method == 'get'
9696

9797
if not is_batch:
98-
assert isinstance(data, dict), "GraphQL params should be a dict. Received {}.".format(data)
98+
if not isinstance(data, dict):
99+
raise HttpQueryError(
100+
400,
101+
'GraphQL params should be a dict. Received {}.'.format(data)
102+
)
99103
data = dict(data, **request.args.to_dict())
100104
data = [data]
101105
elif not self.batch:

0 commit comments

Comments
 (0)
0