Skip to content

Commit 6ec15f6

Browse files
committed
fix: handle manifest without network
1 parent a8899b8 commit 6ec15f6

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

graph-gateway/src/network/internal/pre_processing.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,15 @@ fn into_subgraph_version_raw_info(
202202
let manifest = deployment
203203
.manifest
204204
.ok_or_else(|| anyhow!("missing manifest"))?;
205+
let manifest_network = manifest
206+
.network
207+
.ok_or_else(|| anyhow!("manifest missing network"))?;
205208

206209
let version_number = version.version;
207210
let version_deployment = DeploymentRawInfo {
208211
id: deployment_id,
209212
allocations: deployment_allocations,
210-
manifest_network: manifest.network,
213+
manifest_network,
211214
manifest_start_block: manifest.start_block,
212215
subgraphs: Default::default(),
213216
transferred_to_l2: deployment_transferred_to_l2,

graph-gateway/src/network/subgraph_client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub mod types {
4141
#[derive(Debug, Clone, Deserialize)]
4242
#[serde(rename_all = "camelCase")]
4343
pub struct Manifest {
44-
pub network: String,
44+
pub network: Option<String>,
4545
#[serde_as(as = "serde_with::DisplayFromStr")]
4646
pub start_block: BlockNumber,
4747
}

0 commit comments

Comments
 (0)