INNER CODE UNIT · Rust
Some
apollographql/apollo-mcp-server · crates/apollo-schema-index/src/lib.rs:444
if let Some(score) = scores.get(¤t_type) {
root_path_score += options.parent_match_boost_factor * *score;
}
if referencing_types.is_empty() {
// This is a root type (no referencing types)
let root_path = current_path.clone();
root_paths.push(Scored::new(root_path, root_path_score));
root_path_count += 1;
} else {
// Continue traversing up to a root type
for ref_type in referencing_types {
let (type_name, field_name, field_args) =
if let Some((type_name, field_name)) = ref_type.split_once('#') {
if let Some((field_name, field_args)) = field_name.split_once('#') {
(
type_name.to_string(),
Some(Name::new_unchecked(field_name)),