v3-subgraph
v3-subgraph copied to clipboard
Querying multiple tokens at a time in tokenHourDatas
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\")})"
}
]
}