printArgs method
Implementation
String printArgs(
List<GraphQLFieldInput> args, [
String indentation = '',
]) {
if (args.isEmpty) {
return '';
}
// If every arg does not have a description, print them on one line.
if (args.every((arg) => arg.description == null)) {
return '(' + args.map(printInputValue).join(', ') + ')';
}
return '(\n' +
args
.mapIndexed(
(i, arg) =>
printDescription(
arg.description, ' ' + indentation, i == 0) +
' ' +
indentation +
printInputValue(arg),
)
.join('\n') +
'\n' +
indentation +
')';
}