File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -153,9 +153,6 @@ def graphql_impl(
153
153
document = parse (source )
154
154
except GraphQLError as error :
155
155
return ExecutionResult (data = None , errors = [error ])
156
- except Exception as error :
157
- error = GraphQLError (str (error ), original_error = error )
158
- return ExecutionResult (data = None , errors = [error ])
159
156
160
157
# Validate
161
158
from .validation import validate
Original file line number Diff line number Diff line change @@ -92,6 +92,13 @@ def does_not_return_a_promise_for_validation_errors():
92
92
],
93
93
)
94
94
95
+ def raises_a_type_error_when_no_query_is_passed ():
96
+ with raises (TypeError ) as exc_info :
97
+ # noinspection PyTypeChecker
98
+ assert graphql_sync (schema , None ) # type: ignore
99
+ msg = str (exc_info .value )
100
+ assert msg == "Must provide Source. Received: None."
101
+
95
102
def does_not_return_a_promise_for_sync_execution ():
96
103
doc = "query Example { syncField }"
97
104
assert graphql_sync (schema , doc , "rootValue" ) == (
You can’t perform that action at this time.
0 commit comments