Skip to content

Commit d85e56e

Browse files
committed
add null default value parsing tests
1 parent 08fe784 commit d85e56e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

graphql/validation/tests/test_default_values_of_correct_type.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ def test_variables_with_invalid_default_values():
6767
query InvalidDefaultValues(
6868
$a: Int = "one",
6969
$b: String = 4,
70-
$c: ComplexInput = "notverycomplex"
70+
$c: ComplexInput = "notverycomplex",
71+
$d: Int! = null
7172
) {
7273
dog { name }
7374
}
@@ -76,7 +77,9 @@ def test_variables_with_invalid_default_values():
7677
bad_value('b', 'String', '4', 4, 22),
7778
bad_value('c', 'ComplexInput', '"notverycomplex"', 5, 28, [
7879
'Expected "ComplexInput", found not an object.'
79-
])
80+
]),
81+
bad_value('d', 'Int!', 'null', 6, 20),
82+
default_for_non_null_arg('d', 'Int!', 'Int', 6, 20)
8083
])
8184

8285

0 commit comments

Comments
 (0)