|
4 | 4 | from ..error import GraphQLError |
5 | 5 | from ..language import ast |
6 | 6 | from ..pyutils.default_ordered_dict import DefaultOrderedDict |
7 | | -from ..type.definition import GraphQLInterfaceType, GraphQLUnionType |
| 7 | +from ..type.definition import Undefined, GraphQLInterfaceType, GraphQLUnionType |
8 | 8 | from ..type.directives import GraphQLIncludeDirective, GraphQLSkipDirective |
9 | 9 | from ..type.introspection import (SchemaMetaFieldDef, TypeMetaFieldDef, |
10 | 10 | TypeNameMetaFieldDef) |
11 | 11 | from ..utils.type_from_ast import type_from_ast |
12 | 12 | from .values import get_argument_values, get_variable_values |
13 | 13 |
|
14 | 14 |
|
15 | | -class _Undefined(object): |
16 | | - def __bool__(self): |
17 | | - return False |
18 | | - |
19 | | - __nonzero__ = __bool__ |
20 | | - |
21 | | - |
22 | | -Undefined = _Undefined() |
23 | | - |
24 | | - |
25 | 15 | class ExecutionContext(object): |
26 | 16 | """Data that must be available at all points during query execution. |
27 | 17 |
|
@@ -93,7 +83,7 @@ def get_argument_values(self, field_def, field_ast): |
93 | 83 | return result |
94 | 84 |
|
95 | 85 | def report_error(self, error, traceback=None): |
96 | | - sys.excepthook(type(error), str(error), getattr(error, 'stack', None) or traceback) |
| 86 | + sys.excepthook(type(error), error, getattr(error, 'stack', None) or traceback) |
97 | 87 | self.errors.append(error) |
98 | 88 |
|
99 | 89 | def get_sub_fields(self, return_type, field_asts): |
|
0 commit comments