@@ -278,6 +278,7 @@ where
278278 start_block_override : Option < BlockPtr > ,
279279 graft_block_override : Option < BlockPtr > ,
280280 history_blocks : Option < i32 > ,
281+ ignore_graft_base : bool ,
281282 ) -> Result < DeploymentLocator , SubgraphRegistrarError > {
282283 // We don't have a location for the subgraph yet; that will be
283284 // assigned when we deploy for real. For logging purposes, make up a
@@ -330,6 +331,7 @@ where
330331 self . version_switching_mode ,
331332 & resolver,
332333 history_blocks,
334+ ignore_graft_base,
333335 )
334336 . await ?
335337 }
@@ -348,6 +350,7 @@ where
348350 self . version_switching_mode ,
349351 & resolver,
350352 history_blocks,
353+ ignore_graft_base,
351354 )
352355 . await ?
353356 }
@@ -366,6 +369,7 @@ where
366369 self . version_switching_mode ,
367370 & resolver,
368371 history_blocks,
372+ ignore_graft_base,
369373 )
370374 . await ?
371375 }
@@ -384,6 +388,7 @@ where
384388 self . version_switching_mode ,
385389 & resolver,
386390 history_blocks,
391+ ignore_graft_base,
387392 )
388393 . await ?
389394 }
@@ -570,6 +575,7 @@ async fn create_subgraph_version<C: Blockchain, S: SubgraphStore>(
570575 version_switching_mode : SubgraphVersionSwitchingMode ,
571576 resolver : & Arc < dyn LinkResolver > ,
572577 history_blocks_override : Option < i32 > ,
578+ ignore_graft_base : bool ,
573579) -> Result < DeploymentLocator , SubgraphRegistrarError > {
574580 let raw_string = serde_yaml:: to_string ( & raw ) . unwrap ( ) ;
575581
@@ -591,10 +597,21 @@ async fn create_subgraph_version<C: Blockchain, S: SubgraphStore>(
591597 Err ( StoreError :: DeploymentNotFound ( _) ) => true ,
592598 Err ( e) => return Err ( SubgraphRegistrarError :: StoreError ( e) ) ,
593599 } ;
594- let manifest = unvalidated
595- . validate ( store. cheap_clone ( ) , should_validate)
596- . await
597- . map_err ( SubgraphRegistrarError :: ManifestValidationError ) ?;
600+
601+ let manifest = {
602+ let should_validate = should_validate && !ignore_graft_base;
603+
604+ let mut manifest = unvalidated
605+ . validate ( store. cheap_clone ( ) , should_validate)
606+ . await
607+ . map_err ( SubgraphRegistrarError :: ManifestValidationError ) ?;
608+
609+ if ignore_graft_base {
610+ manifest. graft = None ;
611+ }
612+
613+ manifest
614+ } ;
598615
599616 let network_name: Word = manifest. network_name ( ) . into ( ) ;
600617
0 commit comments