Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Querying multiple tokens at a time in tokenHourDatas #184

Open
stevenxchung opened this issue Aug 5, 2023 · 0 comments
Open

Querying multiple tokens at a time in tokenHourDatas #184

stevenxchung opened this issue Aug 5, 2023 · 0 comments

Comments

@stevenxchung
Copy link

Subgraph Issues

Not sure if this is an open issue or maybe a typo on my end but when using the Uniswap V3 Subgraph explorer I am able to query a single token at a time but not for multiple tokens at a time.

Working Queries

Where token is 0x1f9840a85d5af5bf1d1762f925bdaddc4201f984:

{
  tokenHourDatas(
    first: 2
    orderBy: periodStartUnix
    orderDirection: asc
    where: {token: "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"}
  ) {
    periodStartUnix
    token {
      id
    }
  }
}

{
  "data": {
    "tokenHourDatas": [
      {
        "periodStartUnix": 1620154800,
        "token": {
          "id": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
        }
      },
      {
        "periodStartUnix": 1620162000,
        "token": {
          "id": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
        }
      }
    ]
  }
}

Where token is 0x6b175474e89094c44da98b954eedeac495271d0f:

{
  tokenHourDatas(
    first: 2
    orderBy: periodStartUnix
    orderDirection: asc
    where: {token: "0x6b175474e89094c44da98b954eedeac495271d0f"}
  ) {
    periodStartUnix
    token {
      id
    }
  }
}

{
  "data": {
    "tokenHourDatas": [
      {
        "periodStartUnix": 1620154800,
        "token": {
          "id": "0x6b175474e89094c44da98b954eedeac495271d0f"
        }
      },
      {
        "periodStartUnix": 1620162000,
        "token": {
          "id": "0x6b175474e89094c44da98b954eedeac495271d0f"
        }
      }
    ]
  }
}

Issues w/ Querying Multiple Tokens

{
  tokenHourDatas(
    first: 2
    orderBy: periodStartUnix
    orderDirection: asc
    where: {token: "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984", or: {token: "0x6b175474e89094c44da98b954eedeac495271d0f"}}
  ) {
    periodStartUnix
    token {
      id
    }
  }
}

{
  "errors": [
    {
      "locations": [
        {
          "column": 0,
          "line": 0
        }
      ],
      "message": "Invalid value provided for argument `where`: Object({\"or\": Object({\"token\": String(\"0x6b175474e89094c44da98b954eedeac495271d0f\")}), \"token\": String(\"0x1f9840a85d5af5bf1d1762f925bdaddc4201f984\")})"
    }
  ]
}
@stevenxchung stevenxchung changed the title Querying multiple tokens at a time Querying multiple tokens in tokenHourDatas at a time Aug 5, 2023
@stevenxchung stevenxchung changed the title Querying multiple tokens in tokenHourDatas at a time Querying multiple tokens at a time in tokenHourDatas Aug 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant