File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
crates/apollo-mcp-server/src/introspection Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -83,15 +83,20 @@ fn minify_directives(directives: &apollo_compiler::ast::DirectiveList) -> String
83
83
for directive in directives. iter ( ) {
84
84
if let Some ( minified_name) = directives_to_minify. get ( directive. name . as_str ( ) ) {
85
85
if !directive. arguments . is_empty ( ) {
86
- // Since we're only handling @deprecated right now we can just add the reason and minify it
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.
87
88
let reason = directive
88
89
. arguments
89
90
. iter ( )
90
91
. find ( |a| a. name == "reason" )
91
92
. and_then ( |a| a. value . as_str ( ) )
92
93
. unwrap_or ( "No longer supported" )
93
94
. to_string ( ) ;
94
- result. push_str ( & format ! ( "@{}(\" {}\" )" , minified_name, reason) ) ;
95
+ result. push_str ( & format ! (
96
+ "@{}(\" {}\" )" ,
97
+ minified_name,
98
+ normalize_description( & reason)
99
+ ) ) ;
95
100
} else {
96
101
result. push_str ( & format ! ( "@{}" , minified_name) ) ;
97
102
}
You can’t perform that action at this time.
0 commit comments