Skip to content

Commit 52e030b

Browse files
authored
feat: add __str__ to ExecutionResult class (#277)
1 parent f342523 commit 52e030b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

graphql/error/base.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ def __init__(
4444
self._locations = locations
4545
self.path = path
4646
self.extensions = extensions
47-
return None
4847

4948
@property
5049
def source(self):

graphql/execution/base.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ def __eq__(self, other):
4848
and self.invalid == other.invalid
4949
)
5050

51+
def __str__(self):
52+
return str(self.to_dict())
53+
5154
def to_dict(self, format_error=None, dict_class=OrderedDict):
5255
# type: (Optional[Callable[[Exception], Dict]], Type[Dict]) -> Dict[str, Any]
5356
if format_error is None:

0 commit comments

Comments
 (0)