diff --git a/packages/fuel-indexer-graphql/src/query.rs b/packages/fuel-indexer-graphql/src/query.rs index 83586affb..20c3574b3 100644 --- a/packages/fuel-indexer-graphql/src/query.rs +++ b/packages/fuel-indexer-graphql/src/query.rs @@ -798,14 +798,14 @@ impl SelectionNode { arguments, parent_obj, } => { - println!("{arguments:#?}"); if let Some(parent_entity) = parent_obj { if let Some(fk_map) = schema .foreign_key_mappings() .get(&parent_entity.to_lowercase()) { + let key = name.replace("Connection", ""); if let Some((fk_table, fk_field)) = - fk_map.get(&entity.to_lowercase()) + fk_map.get(&key.to_lowercase()) { let outer_obj_node = dependency_graph.add_node(format!( @@ -821,7 +821,7 @@ impl SelectionNode { )); let connecting_node = dependency_graph.add_node(format!( - "{}.{}s_{}", + "{}.{}s_{}s", schema.fully_qualified_namespace(), parent_entity.to_lowercase(), entity.to_lowercase(),