Skip to content

Commit e1835cb

Browse files
committed
feat: add graph-indexed header in subgraph query response
1 parent ccdb398 commit e1835cb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

crates/service/src/routes/request_handler.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ use thegraph_core::DeploymentId;
1212
use tracing::trace;
1313

1414
const GRAPH_ATTESTABLE: &str = "graph-attestable";
15+
const GRAPH_INDEXED: &str = "graph-indexed";
1516

1617
pub async fn request_handler(
1718
Path(deployment): Path<DeploymentId>,
@@ -54,5 +55,10 @@ pub async fn request_handler(
5455
let mut response = Response::new(body);
5556
response.extensions_mut().insert(attestation_input);
5657

58+
let graph_indexed = response.headers().get(GRAPH_INDEXED).cloned();
59+
if let Some(graph_indexed) = graph_indexed {
60+
response.headers_mut().append(GRAPH_INDEXED, graph_indexed);
61+
}
62+
5763
Ok(response)
5864
}

0 commit comments

Comments
 (0)