@@ -207,12 +207,23 @@ impl IndexerService {
207207
208208 let network_subgraph: & ' static SubgraphClient = Box :: leak ( Box :: new ( SubgraphClient :: new (
209209 http_client. clone ( ) ,
210- Some ( DeploymentDetails {
211- deployment : options. config . subgraphs . network . config . deployment_id ,
212- status_url : Some ( options. config . graph_node . status_url . clone ( ) ) ,
213- query_url : options. config . graph_node . query_url . clone ( ) ,
214- query_auth_token : options. config . service . free_query_auth_token . clone ( ) ,
215- } ) ,
210+ options
211+ . config
212+ . subgraphs
213+ . network
214+ . config
215+ . deployment_id
216+ . map ( |deployment| {
217+ DeploymentDetails :: for_graph_node_url (
218+ options. config . graph_node . status_url . clone ( ) ,
219+ options. config . graph_node . query_url . clone ( ) ,
220+ deployment,
221+ )
222+ } )
223+ . transpose ( )
224+ . expect (
225+ "Failed to parse graph node query endpoint and network subgraph deployment" ,
226+ ) ,
216227 DeploymentDetails :: for_query_url_with_token (
217228 options. config . subgraphs . network . config . query_url . as_ref ( ) ,
218229 options
@@ -260,12 +271,21 @@ impl IndexerService {
260271
261272 let escrow_subgraph: & ' static SubgraphClient = Box :: leak ( Box :: new ( SubgraphClient :: new (
262273 http_client,
263- Some ( DeploymentDetails {
264- deployment : options. config . subgraphs . escrow . config . deployment_id ,
265- status_url : Some ( options. config . graph_node . status_url . clone ( ) ) ,
266- query_url : options. config . graph_node . query_url . clone ( ) ,
267- query_auth_token : options. config . service . free_query_auth_token . clone ( ) ,
268- } ) ,
274+ options
275+ . config
276+ . subgraphs
277+ . escrow
278+ . config
279+ . deployment_id
280+ . map ( |deployment| {
281+ DeploymentDetails :: for_graph_node_url (
282+ options. config . graph_node . status_url . clone ( ) ,
283+ options. config . graph_node . query_url . clone ( ) ,
284+ deployment,
285+ )
286+ } )
287+ . transpose ( )
288+ . expect ( "Failed to parse graph node query endpoint and escrow subgraph deployment" ) ,
269289 DeploymentDetails :: for_query_url_with_token (
270290 options. config . subgraphs . escrow . config . query_url . as_ref ( ) ,
271291 options
0 commit comments