Skip to content

Adding exception loggging #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions graphql/core/execution/executor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import collections
import functools
import logging

from ..error import GraphQLError
from ..language import ast
Expand All @@ -14,6 +15,9 @@
get_field_def, get_operation_root_type


logger = logging.getLogger(__name__)


class Executor(object):
def __init__(self, execution_middlewares=None, default_resolver=default_resolve_fn, map_type=dict):
assert issubclass(map_type, collections.MutableMapping)
Expand Down Expand Up @@ -316,4 +320,5 @@ def run_resolve_fn(self, resolve_fn, source, args, info):

return curried_resolve_fn()
except Exception as e:
logger.info(e, exc_info=True)
return e