How to use parameterized cascade?

I am using the docker image for dgraph master branch. But the schema doesn’t show @cascade directive to be accepting any arguments.

Is there a way that I can use parameterized cascade?

Hi Ketan,
It should work on standalone:master. Also, there is nothing specific that needs to be done on schema for enabling parameterized cascade.

You could fire it directly from graphql playground : example (just a dummy query that I fired through playground)

query {
  queryReview(filter: { comment: {alloftext: "easy to install"}}) @cascade(fields:["comment"] ) {
    comment
    by {
      username
    }
    about {
      name
    }
  }
}

Please make sure you have the latest standalone. You might want to delete the image you have and pull a fresh one (I faced some issues because the docker image was outdated).

1 Like