Skip to content

Commit

Permalink
Add persist_config to a single project configuration
Browse files Browse the repository at this point in the history
Summary: For more details see: #3627

Reviewed By: kassens

Differential Revision: D32261009

fbshipit-source-id: c4cc581b2be8b5372b346e7a796df24578e5463a
  • Loading branch information
alunyov authored and facebook-github-bot committed Nov 9, 2021
1 parent 9657676 commit e575269
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions compiler/crates/relay-compiler/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,11 @@ pub struct SingleProjectConfigFile {

/// This option enables emitting es modules artifacts.
pub eager_es_modules: bool,

/// Query Persist Configuration
/// It contains URL and addition parameters that will be included
/// with the request (think API_KEY, APP_ID, etc...)
pub persist_config: Option<PersistConfig>,
}

impl Default for SingleProjectConfigFile {
Expand All @@ -678,6 +683,7 @@ impl Default for SingleProjectConfigFile {
language: Some(TypegenLanguage::default()),
custom_scalars: Default::default(),
eager_es_modules: false,
persist_config: None,
}
}
}
Expand All @@ -695,6 +701,7 @@ impl From<SingleProjectConfigFile> for MultiProjectConfigFile {
oss_config.schema,
)),
extensions: oss_config.extensions,
persist: oss_config.persist_config,
typegen_config: TypegenConfig {
language: oss_config.language.unwrap_or(TypegenLanguage::TypeScript),
custom_scalar_types: oss_config.custom_scalars,
Expand Down

0 comments on commit e575269

Please sign in to comment.