File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed 
crates/apollo-mcp-server/src/operations Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -543,7 +543,7 @@ fn get_json_schema(
543543                        . map ( |d| d. join ( "#" ) ) 
544544                } ) ; 
545545
546-             let  nested = schema_walker:: walk ( 
546+             let  nested = schema_walker:: type_to_schema ( 
547547                variable. ty . as_ref ( ) , 
548548                graphql_schema, 
549549                & mut  definitions, 
@@ -656,7 +656,7 @@ mod tests {
656656        . expect ( "schema should be valid" ) 
657657    } ) ; 
658658
659-     /// JSON-ifies  the input, sorting the object keys 
659+     /// Serializes  the input to JSON , sorting the object keys 
660660macro_rules!  to_sorted_json { 
661661        ( $json: expr)  => { { 
662662            let  mut  j = serde_json:: json!( $json) ; 
Original file line number Diff line number Diff line change @@ -9,11 +9,14 @@ use serde_json::{Map, Value};
99
1010use  crate :: custom_scalar_map:: CustomScalarMap ; 
1111
12- pub ( super )   mod  name; 
13- pub ( super )   mod  r#type; 
12+ mod  name; 
13+ mod  r#type; 
1414
15- /// Walk a top-level type and generate a JSON Schema 
16- pub  fn  walk ( 
15+ /// Convert a GraphQL type into a JSON Schema. 
16+ /// 
17+ /// Note: This is recursive, which might cause a stack overflow if the type is 
18+ /// sufficiently nested / complex. 
19+ pub  fn  type_to_schema ( 
1720    r#type :  & Type , 
1821    schema :  & GraphQLSchema , 
1922    definitions :  & mut  Map < String ,  Value > , 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments