Fixes #946
This commit is contained in:
parent
227a63d0ad
commit
933a818afb
|
@ -606,20 +606,7 @@ impl Registry {
|
|||
})
|
||||
.collect();
|
||||
|
||||
if !possible_types.is_empty() {
|
||||
self.types.insert(
|
||||
"_Entity".to_string(),
|
||||
MetaType::Union {
|
||||
name: "_Entity".to_string(),
|
||||
description: None,
|
||||
possible_types,
|
||||
visible: None,
|
||||
rust_typename: "async_graphql::federation::Entity",
|
||||
},
|
||||
);
|
||||
|
||||
let query_root = self.types.get_mut(&self.query_type).unwrap();
|
||||
if let MetaType::Object { fields, .. } = query_root {
|
||||
if let MetaType::Object { fields, .. } = self.types.get_mut(&self.query_type).unwrap() {
|
||||
fields.insert(
|
||||
"_service".to_string(),
|
||||
MetaField {
|
||||
|
@ -636,7 +623,21 @@ impl Registry {
|
|||
compute_complexity: None,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
if !possible_types.is_empty() {
|
||||
self.types.insert(
|
||||
"_Entity".to_string(),
|
||||
MetaType::Union {
|
||||
name: "_Entity".to_string(),
|
||||
description: None,
|
||||
possible_types,
|
||||
visible: None,
|
||||
rust_typename: "async_graphql::federation::Entity",
|
||||
},
|
||||
);
|
||||
|
||||
if let MetaType::Object { fields, .. } = self.types.get_mut(&self.query_type).unwrap() {
|
||||
fields.insert(
|
||||
"_entities".to_string(),
|
||||
MetaField {
|
||||
|
|
Loading…
Reference in New Issue
Block a user