code: def get_deprecation_reason(
      node: Union[EnumValueDefinitionNode, FieldDefinitionNode]
  ) -> Optional[str]:
      
      from ..execution import get_directive_values
  
      deprecated = get_directive_values(GraphQLDeprecatedDirective, node)
      return deprecated["reason"] if deprecated else None
docs: Given a field or enum value node, get deprecation reason as string.