compound-v2-subgraph icon indicating copy to clipboard operation
compound-v2-subgraph copied to clipboard

Querying with a block number throws an error

Open rbval opened this issue 4 years ago • 0 comments

Trying out the following query:

{
  markets(block:{number: 10452217}, first: 7) {
    borrowRate
    cash
    collateralFactor
    exchangeRate
    interestRateModelAddress
    name
    reserves
    supplyRate
    symbol
    id
    totalBorrows
    totalSupply
    underlyingAddress
    underlyingName
    underlyingPrice
    underlyingSymbol
    reserveFactor
    underlyingPriceUSD
  }
}

gives the following error:

{
  "errors": [
    {
      "message": "Invalid value provided for argument `block`: Variable(\"_v2_block\")",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "markets"
      ],
      "extensions": {
        "code": "INTERNAL_SERVER_ERROR",
        "exception": {
          "errors": [
            {
              "message": "Invalid value provided for argument `block`: Variable(\"_v2_block\")",
              "locations": [],
              "path": [
                "markets"
              ]
            }
          ]
        }
      }
    }
  ],
  "data": null
}

Tried this out with other subgraphs and block querying seems to work with them.

rbval avatar Jul 13 '20 16:07 rbval