Skip to content

Commit d8bb519

Browse files
authored
Fix empty response err on GQL return empty list (#210)
* test(common): monitor w/ empty list GQL response Signed-off-by: Alexis Asseman <[email protected]> * fix(common): Empty response err on GQL return empty list Signed-off-by: Alexis Asseman <[email protected]> --------- Signed-off-by: Alexis Asseman <[email protected]>
1 parent 69c55f0 commit d8bb519

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

common/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ tower_governor = "0.3.2"
4343
tower-http = { version = "0.5.2", features = ["trace", "cors", "normalize-path"] }
4444
tokio-util = "0.7.10"
4545
bigdecimal = "0.4.2"
46-
thegraph-core = { version = "0.4.1", features = ["subgraph-client"] }
46+
thegraph-core = { version = "0.5.2", features = ["subgraph-client"] }
4747

4848
[dev-dependencies]
4949
env_logger = "0.9.0"

common/src/allocations/monitor.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,16 @@ mod test {
129129
.await;
130130
assert!(result.unwrap().len() > 2000)
131131
}
132+
133+
#[tokio::test]
134+
async fn test_network_query_empty_response() {
135+
let result = get_allocations(
136+
network_subgraph_client(),
137+
Address::from_str("0xdeadbeefcafebabedeadbeefcafebabedeadbeef").unwrap(),
138+
Duration::from_secs(1712448507),
139+
)
140+
.await
141+
.unwrap();
142+
assert!(result.is_empty())
143+
}
132144
}

0 commit comments

Comments
 (0)