Skip to content

Commit

Permalink
Improve name for Client Edge stripping transforms
Browse files Browse the repository at this point in the history
Reviewed By: josephsavona

Differential Revision: D37086659

fbshipit-source-id: 8d865e06a8c321dfd553e57bee417089cacbaca4
  • Loading branch information
captbaritone authored and facebook-github-bot committed Jun 11, 2022
1 parent f1072fa commit 0d173d6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions compiler/crates/relay-transforms/src/apply_transforms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ fn apply_operation_transforms(
})?;

program = log_event.time("preserve_client_edge_backing_ids", || {
preserve_client_edge_backing_ids(&program)
remove_client_edge_selections(&program)
})?;

program = log_event.time("split_module_import", || {
Expand Down Expand Up @@ -597,7 +597,7 @@ fn apply_typegen_transforms(
)
})?;
program = log_event.time("preserve_client_edge_selections", || {
preserve_client_edge_selections(&program)
remove_client_edge_backing_ids(&program)
})?;
log_event.time("flatten", || flatten(&mut program, false, false))?;
program = log_event.time("transform_refetchable_fragment", || {
Expand Down
4 changes: 2 additions & 2 deletions compiler/crates/relay-transforms/src/client_edges.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ fn make_refetchable_directive(query_name: StringKey) -> Directive {
}
}

pub fn preserve_client_edge_selections(program: &Program) -> DiagnosticsResult<Program> {
pub fn remove_client_edge_backing_ids(program: &Program) -> DiagnosticsResult<Program> {
let mut transform = ClientEdgesCleanupTransform::new(CleanupMode::PreserveSelectionsField);
let next_program = transform
.transform_program(program)
Expand All @@ -450,7 +450,7 @@ pub fn preserve_client_edge_selections(program: &Program) -> DiagnosticsResult<P
Ok(next_program)
}

pub fn preserve_client_edge_backing_ids(program: &Program) -> DiagnosticsResult<Program> {
pub fn remove_client_edge_selections(program: &Program) -> DiagnosticsResult<Program> {
let mut transform = ClientEdgesCleanupTransform::new(CleanupMode::PreserveBackingField);
let next_program = transform
.transform_program(program)
Expand Down
2 changes: 1 addition & 1 deletion compiler/crates/relay-transforms/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ pub use assignable_fragment_spread::{
UPDATABLE_DIRECTIVE_FOR_TYPEGEN,
};
pub use client_edges::{
client_edges, preserve_client_edge_backing_ids, preserve_client_edge_selections,
client_edges, remove_client_edge_backing_ids, remove_client_edge_selections,
ClientEdgeGeneratedQueryMetadataDirective, ClientEdgeMetadata, ClientEdgeMetadataDirective,
CLIENT_EDGE_GENERATED_FRAGMENT_KEY, CLIENT_EDGE_SOURCE_NAME,
CLIENT_EDGE_WATERFALL_DIRECTIVE_NAME,
Expand Down

0 comments on commit 0d173d6

Please sign in to comment.