diff --git a/graphql/error/base.py b/graphql/error/base.py index 2865e4a4..2ed1803f 100644 --- a/graphql/error/base.py +++ b/graphql/error/base.py @@ -44,7 +44,6 @@ def __init__( self._locations = locations self.path = path self.extensions = extensions - return None @property def source(self): diff --git a/graphql/execution/base.py b/graphql/execution/base.py index d71151a5..240b95c1 100644 --- a/graphql/execution/base.py +++ b/graphql/execution/base.py @@ -48,6 +48,9 @@ def __eq__(self, other): and self.invalid == other.invalid ) + def __str__(self): + return str(self.to_dict()) + def to_dict(self, format_error=None, dict_class=OrderedDict): # type: (Optional[Callable[[Exception], Dict]], Type[Dict]) -> Dict[str, Any] if format_error is None: