export_sdl: avoid trailing space for scalar definitions
This has been introduced in 06973ee
.
The problem can easily be avoided by modifying the `write!`
directives inside the federation if-clause to write space
prefixes instead of suffixes.
This commit is contained in:
parent
9dd3ec894f
commit
faf407b691
|
@ -215,14 +215,14 @@ impl Registry {
|
|||
if let Some(description) = description {
|
||||
export_description(sdl, options, true, description);
|
||||
}
|
||||
write!(sdl, "scalar {} ", name).ok();
|
||||
write!(sdl, "scalar {}", name).ok();
|
||||
|
||||
if options.federation {
|
||||
if *inaccessible {
|
||||
write!(sdl, "@inaccessible ").ok();
|
||||
write!(sdl, " @inaccessible").ok();
|
||||
}
|
||||
for tag in *tags {
|
||||
write!(sdl, "@tag(name: \"{}\") ", tag.replace('"', "\\\"")).ok();
|
||||
write!(sdl, " @tag(name: \"{}\")", tag.replace('"', "\\\"")).ok();
|
||||
}
|
||||
}
|
||||
writeln!(sdl).ok();
|
||||
|
|
Loading…
Reference in New Issue