Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions crates/service/src/routes/request_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use thegraph_core::DeploymentId;
use tracing::trace;

const GRAPH_ATTESTABLE: &str = "graph-attestable";
const GRAPH_INDEXED: &str = "graph-indexed";

pub async fn request_handler(
Path(deployment): Path<DeploymentId>,
Expand Down Expand Up @@ -41,6 +42,7 @@ pub async fn request_handler(
value.to_str().map(|value| value == "true").unwrap_or(false)
});

let graph_indexed = response.headers().get(GRAPH_INDEXED).cloned();
let body = response
.text()
.await
Expand All @@ -54,5 +56,9 @@ pub async fn request_handler(
let mut response = Response::new(body);
response.extensions_mut().insert(attestation_input);

if let Some(graph_indexed) = graph_indexed {
response.headers_mut().append(GRAPH_INDEXED, graph_indexed);
}

Ok(response)
}
Loading