@@ -206,6 +206,7 @@ def write_domain_files(
206206 output_dir : Path ,
207207 vspec_comments : dict [str , Any ],
208208 directive_processor : Any ,
209+ unit_enums_metadata : dict [str , Any ],
209210 allowed_enums_metadata : dict [str , Any ],
210211) -> None :
211212 """
@@ -217,6 +218,7 @@ def write_domain_files(
217218 output_dir: Output directory
218219 vspec_comments: VSS comments for directive processing
219220 directive_processor: Processor for adding @vspec directives
221+ unit_enums_metadata: Metadata for unit enums
220222 allowed_enums_metadata: Metadata for allowed value enums
221223 """
222224 for file_path , type_names in domain_structure .items ():
@@ -335,6 +337,9 @@ def write_domain_files(
335337 # Process the SDL string to add directives
336338 # We need to split into lines and process
337339 lines = file_content .split ("\n " )
340+ # Process unit enum directives for units file
341+ if file_path == "other/units.graphql" :
342+ lines = directive_processor ._process_unit_enum_directives (lines , unit_enums_metadata , set ())
338343 lines = directive_processor ._process_allowed_enum_directives (lines , allowed_enums_metadata , set ())
339344 lines = directive_processor ._process_field_directives (lines , vspec_comments )
340345 lines = directive_processor ._process_deprecated_directives (
0 commit comments