Query with filter

Try by having an inverse edge on Product:

type Product {
  ...
  reviews: [Review] @hasInverse(field: productID)
}

Then you could do:

query {
  getProduct(id: '0x1') {
    reviews {
      id
      userId
      ...
    }
}

Otherwise you get into the nested filter territory, which you can’t yet do in GraphQL. The workaround is custom dql, which you would have to learn as a separate query language.

J

2 Likes