printSpecifiedByURL method

String printSpecifiedByURL(
  1. GraphQLScalarType scalar
)

Implementation

String printSpecifiedByURL(GraphQLScalarType scalar) {
  final url = scalar.specifiedByURL;
  if (url == null) {
    return '';
  }
  final urlAST = astFromValue(url, graphQLString);
  if (urlAST == null) {
    throw Exception(
      'Unexpected null value returned from `astFromValue` for specifiedByURL',
    );
  }
  return '@specifiedBy(url: ' + printAST(urlAST) + ')';
}