Skip to content

Commit bd16492

Browse files
committed
graph: fix manifest parsing of source subgraphs
1 parent dd795c1 commit bd16492

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

graph/src/data_source/subgraph.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ pub struct UnresolvedDataSource {
147147
}
148148

149149
#[derive(Clone, Debug, Default, Hash, Eq, PartialEq, Deserialize)]
150+
#[serde(rename_all = "camelCase")]
150151
pub struct UnresolvedSource {
151152
address: DeploymentHash,
152153
#[serde(default)]

store/test-store/tests/chain/ethereum/manifest.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ dataSources:
185185
network: mainnet
186186
source:
187187
address: 'QmUVaWpdKgcxBov1jHEa8dr46d2rkVzfHuZFu4fXJ4sFse'
188-
startBlock: 0
188+
startBlock: 9562480
189189
mapping:
190190
apiVersion: 0.0.6
191191
language: wasm/assemblyscript
@@ -207,6 +207,8 @@ specVersion: 1.3.0
207207
match data_source {
208208
DataSourceEnum::Subgraph(ds) => {
209209
assert_eq!(ds.name, "SubgraphSource");
210+
assert_eq!(ds.kind, "subgraph");
211+
assert_eq!(ds.source.start_block, 9562480);
210212
}
211213
_ => panic!("Expected a subgraph data source"),
212214
}

0 commit comments

Comments
 (0)