diff --git a/crates/client/src/client/schema/block.rs b/crates/client/src/client/schema/block.rs index 6cc6df25f0d..b4e7d721963 100644 --- a/crates/client/src/client/schema/block.rs +++ b/crates/client/src/client/schema/block.rs @@ -77,6 +77,8 @@ pub struct BlockEdge { #[cynic(schema_path = "./assets/schema.sdl")] pub enum BlockVersion { V1, + #[cynic(fallback)] + Unknown, } /// Block with transaction ids @@ -123,6 +125,8 @@ pub struct BlockMutation { #[cynic(schema_path = "./assets/schema.sdl")] pub enum HeaderVersion { V1, + #[cynic(fallback)] + Unknown, } #[derive(cynic::QueryFragment, Clone, Debug)] diff --git a/crates/client/src/client/types/block.rs b/crates/client/src/client/types/block.rs index 3f96d34cc6e..e09e6039f32 100644 --- a/crates/client/src/client/types/block.rs +++ b/crates/client/src/client/types/block.rs @@ -95,6 +95,7 @@ impl TryFrom for Header { time: value.time.0, application_hash: value.application_hash.into(), }), + _ => Err(ConversionError::UnknownVariant("HeaderVersion")), } } } @@ -157,6 +158,7 @@ impl TryFrom for Block { block_producer, }) } + _ => Err(ConversionError::UnknownVariant("BlockVersion")), } } }