File tree Expand file tree Collapse file tree 1 file changed +15
-20
lines changed
compiler/crates/relay-bin/src Expand file tree Collapse file tree 1 file changed +15
-20
lines changed Original file line number Diff line number Diff line change @@ -314,28 +314,23 @@ async fn handle_compiler_command(command: CompileCommand) -> Result<(), Error> {
314314
315315 if command. validate {
316316 config. artifact_writer = Box :: < ArtifactValidationWriter > :: default ( ) ;
317- // Disable persister and persisted queries in validate mode
318- config. create_operation_persister = None ;
319- for project_config in config. projects . values_mut ( ) {
320- project_config. persist = None ;
321- }
322- } else {
323- config. create_operation_persister = Some ( Box :: new ( |project_config| {
324- project_config. persist . as_ref ( ) . map (
325- |persist_config| -> Box < dyn OperationPersister + Send + Sync > {
326- match persist_config {
327- PersistConfig :: Remote ( remote_config) => {
328- Box :: new ( RemotePersister :: new ( remote_config. clone ( ) ) )
329- }
330- PersistConfig :: Local ( local_config) => {
331- Box :: new ( LocalPersister :: new ( local_config. clone ( ) ) )
332- }
333- }
334- } ,
335- )
336- } ) ) ;
337317 }
338318
319+ config. create_operation_persister = Some ( Box :: new ( |project_config| {
320+ project_config. persist . as_ref ( ) . map (
321+ |persist_config| -> Box < dyn OperationPersister + Send + Sync > {
322+ match persist_config {
323+ PersistConfig :: Remote ( remote_config) => {
324+ Box :: new ( RemotePersister :: new ( remote_config. clone ( ) ) )
325+ }
326+ PersistConfig :: Local ( local_config) => {
327+ Box :: new ( LocalPersister :: new ( local_config. clone ( ) ) )
328+ }
329+ }
330+ } ,
331+ )
332+ } ) ) ;
333+
339334 config. file_source_config = if should_use_watchman ( ) {
340335 FileSourceKind :: Watchman
341336 } else {
You can’t perform that action at this time.
0 commit comments