Skip to content

Commit 60ca426

Browse files
committed
add UndefinedDefaultValue type
1 parent 36aaa00 commit 60ca426

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

graphql/utils/undefined.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,19 @@ def __repr__(self):
99

1010

1111
Undefined = _Undefined()
12+
13+
14+
class _UndefinedDefaultValue(object):
15+
def __bool__(self):
16+
return False
17+
18+
__nonzero__ = __bool__
19+
20+
def __eq__(self, other):
21+
return isinstance(other, _UndefinedDefaultValue)
22+
23+
def __repr__(self):
24+
return 'UndefinedDefaultValue'
25+
26+
27+
UndefinedDefaultValue = _UndefinedDefaultValue()

0 commit comments

Comments
 (0)