toSdl method
Build GraphQL field SDL.
Implementation
String toSdl() {
final StringBuffer sdl = StringBuffer(languageKeywordDecode(name));
// Build args SDL.
final String? argsSdl = args?.toSdl();
if (argsSdl != null) {
sdl.write(argsSdl);
}
// Build fields SDL.
final String? fieldsSdl = fields?.toSdl();
if (fieldsSdl != null) {
sdl.write(' $fieldsSdl');
}
return sdl.toString();
}