Skip to content

Commit 3ce124c

Browse files
committed
Set invalid to True for graphql.core.graphql()
1 parent 8dda6cf commit 3ce124c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

graphql/core/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ def graphql(schema, request='', root=None, vars=None, operation_name=None):
1010
validation_errors = validate(schema, ast)
1111
if validation_errors:
1212
return ExecutionResult(
13-
data=None,
1413
errors=validation_errors,
14+
invalid=True,
1515
)
1616
return execute(
1717
schema,

graphql/core/execution/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class ExecutionResult(object):
6666
query, `errors` is null if no errors occurred, and is a
6767
non-empty array if an error occurred."""
6868

69-
def __init__(self, data, errors=None, invalid=False):
69+
def __init__(self, data=None, errors=None, invalid=False):
7070
self.data = data
7171
self.errors = errors
7272
if invalid:

0 commit comments

Comments
 (0)