File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 22// SPDX-License-Identifier: Apache-2.0
33
44use axum:: {
5- extract:: Path ,
5+ extract:: { Path , State } ,
66 response:: { IntoResponse , Response as AxumResponse } ,
7- Extension , Json ,
7+ Json ,
88} ;
99use graphql_client:: GraphQLQuery ;
1010use indexer_config:: GraphNodeConfig ;
@@ -43,7 +43,7 @@ impl IntoResponse for CheckHealthError {
4343
4444pub async fn health (
4545 Path ( deployment_id) : Path < String > ,
46- Extension ( graph_node) : Extension < GraphNodeConfig > ,
46+ State ( graph_node) : State < GraphNodeConfig > ,
4747) -> Result < impl IntoResponse , CheckHealthError > {
4848 let req_body = HealthQuery :: build_query ( health_query:: Variables {
4949 ids : vec ! [ deployment_id] ,
Original file line number Diff line number Diff line change @@ -396,8 +396,10 @@ impl IndexerService {
396396
397397 // Check subgraph Health
398398 misc_routes = misc_routes
399- . route ( "/subgraph/health/:deployment_id" , get ( health) )
400- . route_layer ( Extension ( options. config . graph_node . clone ( ) ) )
399+ . route (
400+ "/subgraph/health/:deployment_id" ,
401+ get ( health) . with_state ( options. config . graph_node . clone ( ) ) ,
402+ )
401403 . layer ( misc_rate_limiter) ;
402404
403405 if options. config . service . serve_network_subgraph {
You can’t perform that action at this time.
0 commit comments