graphprotocol / graph-network-subgraph

The subgraph, the smart contracts, the tests, and documents for the Graph Explorer Decentralized Application
MIT License
70 stars 45 forks source link

Metadata Entity both singular & plural #256

Closed Data-Nexus closed 6 months ago

Data-Nexus commented 7 months ago

When attempting to query the subgraphMetadata and subgraphVersionMetadata I get the normal fields for searching a list of entities - first, where etc. Then when running the query I get an error that I didn't provide an id as though I were attempting to select from a singular entity.

This is likely because of the plural of metadata is probably also metadata. We've run into this with file data sources and went with "meta" which allows us to use "metas", but it may be something that can be solved in the schema dictionary.

{
  subgraphMetadata(first: 10) {
    id
  }
}
abhayait commented 7 months ago

We are also facing the same issue while querying subgraphMetadata and subgraphVersionMetadata

juanmardefago commented 7 months ago

We'll be working and releasing a fix for this during this week

juanmardefago commented 7 months ago

PR for this: https://github.com/graphprotocol/graph-network-subgraph/pull/261 Given that this contains a breaking change, the release for this will take slightly more time, due to the change requiring a public announcement and a rollout procedure.

As part of the rollout procedure, it'll be live on staging for some time before it hits prod, so anyone interested in getting the fix early can use the staging subgraphs on hosted service for it.

As a recap, these are the staging subgraphs for mainnet and arbitrum one:

juanmardefago commented 6 months ago

This has been merged and it's gonna be released in production endpoints tomorrow!