Fixed the bug of generating federation sdl. #96

This commit is contained in:
Sunli 2020-05-19 10:32:08 +08:00
parent 273aecb6bf
commit a87b7f1a71

View File

@ -467,17 +467,10 @@ impl Registry {
keys, keys,
.. ..
} => { } => {
if name.starts_with("__") { if name == &self.query_type && fields.len() == 4 {
return;
}
if name == "_Service" {
return;
}
if fields.len() == 4 {
// Is empty query root, only __schema, __type, _service, _entities fields // Is empty query root, only __schema, __type, _service, _entities fields
return; return;
} }
if *extends { if *extends {
write!(sdl, "extend ").ok(); write!(sdl, "extend ").ok();
} }