@@ -625,7 +625,7 @@ struct MultiProjectConfigFile {
625
625
is_dev_variable_name : Option < String > ,
626
626
}
627
627
628
- #[ derive( Debug , Serialize , Deserialize , Default ) ]
628
+ #[ derive( Debug , Serialize , Deserialize ) ]
629
629
#[ serde( deny_unknown_fields, rename_all = "camelCase" , default ) ]
630
630
pub struct SingleProjectConfigFile {
631
631
/// Path to schema.graphql
@@ -640,22 +640,22 @@ pub struct SingleProjectConfigFile {
640
640
641
641
/// Directories to include under src
642
642
/// default: ['**'],
643
- pub include : Vec < String > ,
643
+ /// TODO(T104508864):: Currently not supported in Rust OSS compiler
644
+ pub includes : Vec < String > ,
644
645
645
646
/// Directories to ignore under src
646
647
/// default: ['**/node_modules/**', '**/__mocks__/**', '**/__generated__/**'],
647
648
pub excludes : Vec < String > ,
648
649
649
650
/// Schema extensions
651
+ /// TODO(T104508864): Currently not supported in Rust OSS compiler
650
652
pub extensions : Vec < String > ,
651
653
652
- /// Use watchman when not in watch mode
653
- pub watchman : bool ,
654
-
655
654
/// This option controls whether or not a catch-all entry is added to enum type definitions
656
655
/// for values that may be added in the future. Enabling this means you will have to update
657
656
/// your application whenever the GraphQL server schema adds new enum values to prevent it
658
657
/// from breaking.
658
+ /// TODO(T104508864): Currently not supported in Rust OSS compiler
659
659
pub no_future_proof_enums : bool ,
660
660
661
661
/// The name of the language plugin (?) used for input files and artifacts
@@ -666,9 +666,31 @@ pub struct SingleProjectConfigFile {
666
666
pub custom_scalars : FnvIndexMap < StringKey , StringKey > ,
667
667
668
668
/// This option enables emitting es modules artifacts.
669
+ /// TODO(T104508864): Currently not supported in Rust OSS compiler
669
670
pub eager_es_modules : bool ,
670
671
}
671
672
673
+ impl Default for SingleProjectConfigFile {
674
+ fn default ( ) -> Self {
675
+ Self {
676
+ schema : Default :: default ( ) ,
677
+ src : Default :: default ( ) ,
678
+ artifact_directory : Default :: default ( ) ,
679
+ includes : vec ! [ "**" . to_string( ) ] ,
680
+ excludes : vec ! [
681
+ "**/node_modules/**" . to_string( ) ,
682
+ "**/__mocks__/**" . to_string( ) ,
683
+ "**/__generated__/**" . to_string( ) ,
684
+ ] ,
685
+ extensions : vec ! [ ] ,
686
+ no_future_proof_enums : false ,
687
+ language : Some ( TypegenLanguage :: TypeScript ) ,
688
+ custom_scalars : Default :: default ( ) ,
689
+ eager_es_modules : false ,
690
+ }
691
+ }
692
+ }
693
+
672
694
impl From < SingleProjectConfigFile > for MultiProjectConfigFile {
673
695
fn from ( oss_config : SingleProjectConfigFile ) -> MultiProjectConfigFile {
674
696
let root_dir = std:: env:: current_dir ( ) . unwrap ( ) ;
@@ -683,6 +705,7 @@ impl From<SingleProjectConfigFile> for MultiProjectConfigFile {
683
705
) ) ,
684
706
typegen_config : TypegenConfig {
685
707
language : oss_config. language . unwrap_or ( TypegenLanguage :: TypeScript ) ,
708
+ custom_scalar_types : oss_config. custom_scalars ,
686
709
..Default :: default ( )
687
710
} ,
688
711
..Default :: default ( )
0 commit comments