File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
crates/service/src/routes Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ use thegraph_core::DeploymentId;
1212use tracing:: trace;
1313
1414const GRAPH_ATTESTABLE : & str = "graph-attestable" ;
15+ const GRAPH_INDEXED : & str = "graph-indexed" ;
1516
1617pub async fn request_handler (
1718 Path ( deployment) : Path < DeploymentId > ,
@@ -41,6 +42,7 @@ pub async fn request_handler(
4142 value. to_str ( ) . map ( |value| value == "true" ) . unwrap_or ( false )
4243 } ) ;
4344
45+ let graph_indexed = response. headers ( ) . get ( GRAPH_INDEXED ) . cloned ( ) ;
4446 let body = response
4547 . text ( )
4648 . await
@@ -54,5 +56,9 @@ pub async fn request_handler(
5456 let mut response = Response :: new ( body) ;
5557 response. extensions_mut ( ) . insert ( attestation_input) ;
5658
59+ if let Some ( graph_indexed) = graph_indexed {
60+ response. headers_mut ( ) . append ( GRAPH_INDEXED , graph_indexed) ;
61+ }
62+
5763 Ok ( response)
5864}
You can’t perform that action at this time.
0 commit comments