INNER CODE UNIT · Rust
search_camel_case_in_description
apollographql/apollo-mcp-server · crates/apollo-schema-index/src/lib.rs:713
fn search_camel_case_in_description(schema: Valid<Schema>) {
let search = SchemaIndex::new(
&schema,
OperationType::Query | OperationType::Mutation,
15_000_000,
)
.unwrap();
// Tag's description contains "createPost", so searching "post" should match via
// camelCase splitting of the description at index time.
let results = search
.search(vec!["post".to_string()], Options::default())
.unwrap();
let paths: Vec<String> = results.iter().map(ToString::to_string).collect();
assert!(
paths.iter().any(|p| p.contains("Tag")),
"Should find Tag when searching for 'post' (camelCase in description).\nFound paths:\n{}",