File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -1730,6 +1730,23 @@ def rejects_an_input_field_with_an_incorrect_ast_node():
17301730 msg = str (exc_info .value )
17311731 assert msg == "Input field AST node must be an InputValueDefinitionNode."
17321732
1733+ def deprecation_reason_is_preserved_on_fields ():
1734+ input_obj_type = GraphQLInputObjectType (
1735+ "someInputObject" ,
1736+ {
1737+ "deprecatedField" : GraphQLInputField (
1738+ ScalarType , deprecation_reason = "not used anymore"
1739+ )
1740+ },
1741+ )
1742+ deprecated_field = input_obj_type .fields ["deprecatedField" ]
1743+ assert (
1744+ input_obj_type .to_kwargs ()["fields" ]["deprecatedField" ] is deprecated_field
1745+ )
1746+ deprecation_reason = deprecated_field .deprecation_reason
1747+ assert deprecation_reason == "not used anymore"
1748+ assert deprecated_field .to_kwargs ()["deprecation_reason" ] is deprecation_reason
1749+
17331750
17341751def describe_type_system_list ():
17351752 types = [
You can’t perform that action at this time.
0 commit comments