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 @@ -1690,6 +1690,23 @@ def rejects_an_input_field_with_an_incorrect_ast_node():
16901690 msg = str (exc_info .value )
16911691 assert msg == "Input field AST node must be an InputValueDefinitionNode."
16921692
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+
16931710
16941711def describe_type_system_list ():
16951712 types = [
You can’t perform that action at this time.
0 commit comments