I would like to know if there is a way of performing an OR function with a subgraph please:
{
pools(first:10, where: {
token0:"0xbef81556ef066ec840a540595c8d12f516b6378f",
--OR-- token1:"0xbef81556ef066ec840a540595c8d12f516b6378f"
}){
token0{
name
symbol
id
}
token1{
name
symbol
id
}
}
}
Hi @elhaix ! That is not currently possible, and it has been requested for a long time, but we are planning to work on it soon, follow this issue to see progress!
For those interested, here is how I managed to perform an OR function using aliases:
# performing an OR operator by using aliasas
{
matchToken0: pools(first:1, where: {
token0:"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
}){
id # poolID
token0{
name
symbol
id
}
token1{
name
symbol
id
}
}
matchToken1:pools(first:1, where: {
token1:"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
}){
id # poolID
token0{
name
symbol
id
}
token1{
name
symbol
id
}
}
}