INNER CODE UNIT · Rust
schema
apollographql/apollo-mcp-server · crates/apollo-schema-index/src/lib.rs:581
fn schema() -> Valid<Schema> {
Schema::parse(TEST_SCHEMA, "schema.graphql")
.expect("Failed to parse test schema")
.validate()
.expect("Failed to validate test schema")
}
#[rstest]
fn search(schema: Valid<Schema>) {
let search = SchemaIndex::new(
&schema,
OperationType::Query | OperationType::Mutation,
15_000_000,
)
.unwrap();
let results = search
.search(vec!["dimensions".to_string()], Options::default())