graphprotocol / allocation-optimizer

Agents and algorithms for optimizing Indexer decision problems.
MIT License
13 stars 14 forks source link

ERROR: GraphQLClientException: Cannot query field `network_in` on type `SubgraphDeployment_filter` #49

Closed kapoorabhishek24 closed 5 months ago

kapoorabhishek24 commented 5 months ago

Issue: With the new FDS release and refactoring network entity has been deprecated. While running the allocation-optimizer for the network subgraph - https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-arbitrum, I am getting the below error:

ERROR: GraphQLClientException: Cannot query field "network_in" on type "SubgraphDeployment_filter"

As suggested by the Graph Ops Team:

In order to know the network a particular deployment is indexing you need to get the manifest of said deployment, and the manifest entity will have a field for network. Since it's possible to do nested queries, I think you'd only need to add a nested query for deployment.manifest.network instead of deployment.network

FDS Release Notes incase more things need to be changed here: https://github.com/graphprotocol/graph-network-subgraph/releases/tag/v0.23.0

Query update suggested by Juan:

{
  subgraphDeployments(where:{manifest_:{network_in:["mainnet"]}}) {
    id
    manifest {
      network
    }
  }
}
hopeyen commented 5 months ago

:wave: thank you very much for the detailed issue! Closing as issue is resolved as of https://github.com/graphprotocol/allocation-optimizer/commit/9eaefa6e3be57a065e0418277e9ff8baee39a043