blockchainethereumthegraph

Filtering nested properties in subgraph (the graph)


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
    }
  }
}

Solution

  • 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.