File tree 1 file changed +17
-0
lines changed
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -1690,6 +1690,23 @@ def rejects_an_input_field_with_an_incorrect_ast_node():
1690
1690
msg = str (exc_info .value )
1691
1691
assert msg == "Input field AST node must be an InputValueDefinitionNode."
1692
1692
1693
+ def deprecation_reason_is_preserved_on_fields ():
1694
+ input_obj_type = GraphQLInputObjectType (
1695
+ "someInputObject" ,
1696
+ {
1697
+ "deprecatedField" : GraphQLInputField (
1698
+ ScalarType , deprecation_reason = "not used anymore"
1699
+ )
1700
+ },
1701
+ )
1702
+ deprecated_field = input_obj_type .fields ["deprecatedField" ]
1703
+ assert (
1704
+ input_obj_type .to_kwargs ()["fields" ]["deprecatedField" ] is deprecated_field
1705
+ )
1706
+ deprecation_reason = deprecated_field .deprecation_reason
1707
+ assert deprecation_reason == "not used anymore"
1708
+ assert deprecated_field .to_kwargs ()["deprecation_reason" ] is deprecation_reason
1709
+
1693
1710
1694
1711
def describe_type_system_list ():
1695
1712
types = [
You can’t perform that action at this time.
0 commit comments