File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
crates/apollo-mcp-server/src/introspection Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -82,20 +82,19 @@ fn minify_directives(directives: &apollo_compiler::ast::DirectiveList) -> String
8282
8383 for directive in directives. iter ( ) {
8484 if let Some ( minified_name) = directives_to_minify. get ( directive. name . as_str ( ) ) {
85- if !directive . arguments . is_empty ( ) {
86- // Since we're only handling @deprecated right now we can just add the reason and minify it .
87- // We should handle this more generically in the future.
88- let reason = directive
85+ // Since we're only handling @deprecated right now we can just add the reason and minify it.
86+ // We should handle this more generically in the future .
87+ if !directive . arguments . is_empty ( )
88+ && let Some ( reason) = directive
8989 . arguments
9090 . iter ( )
9191 . find ( |a| a. name == "reason" )
9292 . and_then ( |a| a. value . as_str ( ) )
93- . unwrap_or ( "No longer supported" )
94- . to_string ( ) ;
93+ {
9594 result. push_str ( & format ! (
9695 "@{}(\" {}\" )" ,
9796 minified_name,
98- normalize_description( & reason)
97+ normalize_description( reason)
9998 ) ) ;
10099 } else {
101100 result. push_str ( & format ! ( "@{}" , minified_name) ) ;
You can’t perform that action at this time.
0 commit comments