Conversation
9fc5d77 to
3222176
Compare
3222176 to
e8df44e
Compare
e8df44e to
2bff1a0
Compare
Theodus
left a comment
There was a problem hiding this comment.
LGTM. I'm testing this out on the local network before merging
Theodus
left a comment
There was a problem hiding this comment.
This isn't compatible with the indexer-service API. It's incorrectly expecting the response that the gateway returns. See the indexer_client for what the indexer-service returns:
gateway/graph-gateway/src/indexer_client.rs
Lines 80 to 85 in aa876b0
I find this "non-standard" GraphQL-over-HTTP disturbing (to say something). I believe that we should follow the GraphQL specs to reduce the amount of work we need to do 😞 |
|
Still getting errors on the local network: |
| #[derive(Debug, Deserialize)] | ||
| pub struct IndexerResponsePayload<T> { | ||
| #[serde(rename = "graphQLResponse")] | ||
| pub data: Option<T>, |
There was a problem hiding this comment.
This should be data: Option<String> which then gets parsed into T after receiving it.
There was a problem hiding this comment.
Isn't this what serde does?
- If the field is not present, it sets the field to
None. - If it is present, it deserializes it into the
Ttype.
There was a problem hiding this comment.
Ok, I just saw the error message.
It seems that we are escaping the JSON object as a string in the indexer service... Another deviation from the GraphQL-over-HTTP spec 😓
9aad162 to
5848c6b
Compare
Theodus
left a comment
There was a problem hiding this comment.
Still failing on the local network:
Failed to fetch network subgraph from indexer indexer=0xf4EF6650E48d099a4972ea5B414daB86e1998Bd3 error=bootstrap meta query failed: Error sending subgraph meta query: Error deserializing GraphQL response. Unexpected response: {"graphQLResponse":"{\"data\":{\"meta\":{\"block\":{\"number\":92,\"hash\":\"0x39693f38371b63f04710bdd480c3e20ab3f6693f01772417db63b7db6a8ed8df\"}}}}"}. Error: invalid type: string "{\"data\":{\"meta\":{\"block\":{\"number\":92,\"hash\":\"0x39693f38371b63f04710bdd480c3e20ab3f6693f01772417db63b7db6a8ed8df\"}}}}", expected a borrowed string at line 1 column 150
graph-gateway/src/network/subgraph_client/indexers_list_paginated_client/inner_client.rs
Outdated
Show resolved
Hide resolved
Theodus
left a comment
There was a problem hiding this comment.
more errors:
- deserializing the response body still fails (works if
&'data stris replaced withString) - the request fails with "Missing attestation". Attestations aren't expected since we're using the free query route.
374e709 to
6d73e38
Compare
…rvice Signed-off-by: Lorenzo Delgado <lorenzo@edgeandnode.com>
6d73e38 to
e5b9129
Compare
# Release Notes - fix: skip POI fetch until cache TTL expires (#860) - feat: set gateway ID to signer address (#868) - feat: add internal query client to network subgraph service (#856, #880) - feat: direct indexer query API (#867) - fix: remove deprecated data science logs (#882) # Configuration Changes - `gateway_id` removed - `network_subgraph` replaced by `trusted_indexers`
- fix: skip POI fetch until cache TTL expires (#860) - feat: set gateway ID to signer address (#868) - feat: add internal query client to network subgraph service (#856, - feat: direct indexer query API (#867) - fix: remove deprecated data science logs (#882) - `gateway_id` removed - `network_subgraph` replaced by `trusted_indexers`
This PR removes the Gateway's dependency on the hosted service by adding a graph network subgraph client capable of directly querying an indexer from a configurable list of trusted indexer candidates.
This PR resolves #685