Skip to content

Commit

Permalink
Round deux Gating is_distillery flag from query metadata
Browse files Browse the repository at this point in the history
Reviewed By: voideanvalue

Differential Revision: D54066746

fbshipit-source-id: 21a84dd31adefc9e5d922b7ceb94c535ecfa1aaa
  • Loading branch information
Deepak Singh authored and facebook-github-bot committed Feb 22, 2024
1 parent 87ad269 commit 8b3b3fc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ pub async fn persist_operations(
config.custom_override_schema_determinator.as_ref()
{
override_schema = custom_override_schema_determinator(
normalization_operation,
project_config,
normalization_operation,
);
}
let artifact_path = root_dir.join(&artifact.path);
Expand Down
28 changes: 14 additions & 14 deletions compiler/crates/relay-compiler/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ pub struct Config {
/// in the `apply_transforms(...)`.
pub custom_transforms: Option<CustomTransformsConfig>,
pub custom_override_schema_determinator:
Option<Box<dyn Fn(&OperationDefinition, &ProjectConfig) -> Option<String> + Send + Sync>>,
Option<Box<dyn Fn(&ProjectConfig, &OperationDefinition) -> Option<String> + Send + Sync>>,
pub export_persisted_query_ids_to_file: Option<PathBuf>,

/// The async function is called before the compiler connects to the file
Expand Down Expand Up @@ -237,19 +237,19 @@ impl Config {
Ok(None) => Err(Error::ConfigError {
details: format!(
r#"
Configuration for Relay compiler not found.
Configuration for Relay compiler not found.
Please make sure that the configuration file is created in {}.
Please make sure that the configuration file is created in {}.
You can also pass the path to the configuration file as `relay-compiler ./path-to-config/relay.json`.
You can also pass the path to the configuration file as `relay-compiler ./path-to-config/relay.json`.
Example file:
{{
"src": "./src",
"schema": "./path-to/schema.graphql",
"language": "javascript"
}}
"#,
Example file:
{{
"src": "./src",
"schema": "./path-to/schema.graphql",
"language": "javascript"
}}
"#,
match loaders_sources.len() {
1 => loaders_sources[0].to_string(),
2 => format!("{} or {}", loaders_sources[0], loaders_sources[1]),
Expand Down Expand Up @@ -900,10 +900,10 @@ impl<'de> Deserialize<'de> for ConfigFile {
Err(single_project_error) => {
let error_message = format!(
r#"The config file cannot be parsed as a single-project config file due to:
- {:?}.
- {:?}.
It also cannot be a multi-project config file due to:
- {:?}."#,
It also cannot be a multi-project config file due to:
- {:?}."#,
single_project_error, multi_project_error,
);

Expand Down

0 comments on commit 8b3b3fc

Please sign in to comment.