Skip to content

Commit ad91f0c

Browse files
committed
update default_values to default to UndefinedDefaultValue
1 parent 365a92c commit ad91f0c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

graphql/type/definition.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from ..pyutils.cached_property import cached_property
66
from ..pyutils.ordereddict import OrderedDict
77
from ..utils.assert_valid_name import assert_valid_name
8+
from ..utils.undefined import UndefinedDefaultValue
89

910

1011
def is_type(type):
@@ -265,7 +266,7 @@ def __hash__(self):
265266
class GraphQLArgument(object):
266267
__slots__ = 'type', 'default_value', 'description', 'out_name'
267268

268-
def __init__(self, type, default_value=None, description=None, out_name=None):
269+
def __init__(self, type, default_value=UndefinedDefaultValue, description=None, out_name=None):
269270
self.type = type
270271
self.default_value = default_value
271272
self.description = description
@@ -544,7 +545,7 @@ def _define_field_map(self):
544545
class GraphQLInputObjectField(object):
545546
__slots__ = 'type', 'default_value', 'description', 'out_name'
546547

547-
def __init__(self, type, default_value=None, description=None, out_name=None):
548+
def __init__(self, type, default_value=UndefinedDefaultValue, description=None, out_name=None):
548549
self.type = type
549550
self.default_value = default_value
550551
self.description = description
@@ -609,7 +610,7 @@ class RowType(GraphQLObjectType):
609610
610611
Note: the enforcement of non-nullability occurs within the executor.
611612
"""
612-
__slots__ = 'of_type',
613+
__slots__ = 'of_type'
613614

614615
def __init__(self, type):
615616
assert is_type(type) and not isinstance(type, GraphQLNonNull), (

0 commit comments

Comments
 (0)