chore: use thegraph-headers graph-attestation http header #1007
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes aimed at improving the handling of HTTP headers and simplifying the codebase. The most significant changes include the addition of a new crate for headers, removing the
attestation_header
module, and updating how headers are added to HTTP responses.Improvements to header handling:
Cargo.toml
: Added thethegraph-headers
crate with theattestation
feature.src/client_query.rs
: Updated imports to usethegraph_headers
forGraphAttestation
andHttpBuilderExt
. Removed theattestation_header
module import. [1] [2]Codebase simplification:
src/client_query.rs
: Refactored thehandle_query
andhandle_indexer_query
functions to conditionally add theGraphAttestation
header only if it is present. [1] [2]src/client_query/attestation_header.rs
: Removed theattestation_header
module, moving its functionality to thethegraph-headers
crate.src/http_ext.rs
: Removed theHttpBuilderExt
trait as it is now provided by thethegraph-headers
crate. (src/http_ext.rsL1-L25R1)src/main.rs
: Removed thehttp_ext
module import.