File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ The current version 3.0.0b1 of GraphQL-core is up-to-date
1616with GraphQL.js version 14.5.6.
1717
1818All parts of the API are covered by an extensive test suite
19- of currently 1989 unit tests.
19+ of currently 1990 unit tests.
2020
2121
2222## Documentation
Original file line number Diff line number Diff line change @@ -94,8 +94,7 @@ def coerce_variable_values(
9494 coerced_values [var_name ] = value_from_ast (
9595 var_def_node .default_value , var_type
9696 )
97-
98- if is_non_null_type (var_type ):
97+ elif is_non_null_type (var_type ):
9998 var_type_str = inspect (var_type )
10099 on_error (
101100 GraphQLError (
Original file line number Diff line number Diff line change @@ -546,6 +546,17 @@ def allows_nullable_inputs_to_be_set_to_a_value_directly():
546546 assert result == ({"fieldWithNullableStringInput" : "'a'" }, None )
547547
548548 def describe_handles_non_nullable_scalars ():
549+ def allows_non_nullable_variable_to_be_omitted_given_a_default ():
550+ result = execute_query (
551+ """
552+ query ($value: String! = "default") {
553+ fieldWithNullableStringInput(input: $value)
554+ }
555+ """
556+ )
557+
558+ assert result == ({"fieldWithNullableStringInput" : "'default'" }, None )
559+
549560 def allows_non_nullable_inputs_to_be_omitted_given_a_default ():
550561 result = execute_query (
551562 """
You can’t perform that action at this time.
0 commit comments