printDeprecated method

String printDeprecated(
  1. String? reason
)

Implementation

String printDeprecated(String? reason) {
  if (reason == null) {
    return '';
  }
  final reasonAST = astFromValue(reason, graphQLString);
  if (reasonAST != null && reason != DEFAULT_DEPRECATION_REASON) {
    return '@deprecated(reason: ' + printAST(reasonAST) + ')';
  }
  return '@deprecated';
}