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
82
82
83
83
for directive in directives. iter ( ) {
84
84
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
89
89
. arguments
90
90
. iter ( )
91
91
. find ( |a| a. name == "reason" )
92
92
. and_then ( |a| a. value . as_str ( ) )
93
- . unwrap_or ( "No longer supported" )
94
- . to_string ( ) ;
93
+ {
95
94
result. push_str ( & format ! (
96
95
"@{}(\" {}\" )" ,
97
96
minified_name,
98
- normalize_description( & reason)
97
+ normalize_description( reason)
99
98
) ) ;
100
99
} else {
101
100
result. push_str ( & format ! ( "@{}" , minified_name) ) ;
You can’t perform that action at this time.
0 commit comments