From db6567280bdd12892bb6652bca0e844aac7f1661 Mon Sep 17 00:00:00 2001 From: encalypto Date: Wed, 21 Aug 2024 12:58:15 -0400 Subject: [PATCH] Use correct store when loading indexes for graft base --- store/postgres/src/subgraph_store.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/store/postgres/src/subgraph_store.rs b/store/postgres/src/subgraph_store.rs index 7216dc993b5..41cbef15982 100644 --- a/store/postgres/src/subgraph_store.rs +++ b/store/postgres/src/subgraph_store.rs @@ -579,7 +579,12 @@ impl SubgraphStoreInner { let index_def = if let Some(graft) = &graft_base.clone() { if let Some(site) = self.sites.get(graft) { - Some(deployment_store.load_indexes(site)?) + let store = self + .stores + .get(&site.shard) + .ok_or_else(|| StoreError::UnknownShard(site.shard.to_string()))?; + + Some(store.load_indexes(site)?) } else { None }