Skip to content

Commit

Permalink
Export fragment type generation for FCL setup
Browse files Browse the repository at this point in the history
Reviewed By: alunyov

Differential Revision: D49932478

fbshipit-source-id: 9fee1704b6dfa017a936f2a06e58b2907053c5ae
  • Loading branch information
monicatang authored and facebook-github-bot committed Nov 29, 2023
1 parent b379edf commit 2863820
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions compiler/crates/relay-compiler/src/artifact_content/content.rs
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,6 @@ pub fn generate_fragment(
schema,
typegen_fragment,
source_hash,
skip_types,
fragment_locations,
)
} else {
Expand Down Expand Up @@ -588,7 +587,7 @@ fn generate_read_only_fragment(
typegen_fragment,
schema,
project_config,
fragment_locations
fragment_locations,
)
)?;
}
Expand Down Expand Up @@ -653,7 +652,6 @@ fn generate_assignable_fragment(
schema: &SDLSchema,
typegen_fragment: &FragmentDefinition,
source_hash: Option<&String>,
skip_types: bool,
fragment_locations: &FragmentLocations,
) -> Result<Vec<u8>, FmtError> {
let mut content_sections = ContentSections::default();
Expand Down Expand Up @@ -684,18 +682,16 @@ fn generate_assignable_fragment(
writeln!(section, "/*::")?;
}

if !skip_types {
write!(
section,
"{}",
generate_fragment_type_exports_section(
typegen_fragment,
schema,
project_config,
fragment_locations
)
)?;
}
write!(
section,
"{}",
generate_fragment_type_exports_section(
typegen_fragment,
schema,
project_config,
fragment_locations,
)
)?;

if project_config.typegen_config.language == TypegenLanguage::Flow {
writeln!(section, "*/")?;
Expand Down

0 comments on commit 2863820

Please sign in to comment.