Is it possible to filter subgraph using "where" when properties are nested?
For example if we have query like this one, can we filter it by application name?
{
challenges(where: {something?}) {
challenger
outcome
application {
id
name
}
}
}
I have tried it like this one but it doesn't work
{
challenges(where: {application: {name: "something"}) {
challenger
outcome
application {
id
name
}
}
}
You can write:
{
challenges(where: {application_: {name: "something"}) {
challenger
outcome
application {
id
name
}
}
}
Notice
_
after the property name
Docs: https://thegraph.com/docs/en/querying/graphql-api/#example-for-nested-entity-filtering
Unfortunately, The Graph does not currently support nested queries. They currently have it on the roadmap, so my recommendation is to subscribe to their releases in their repository or check their #announcements channel in Discord.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With