Support for @cascade and @normalize directives for subqueries?

Hi All,

I have a lot of situations where I would benefit from being able to use @cascade and @normalize not at the top level of the query, but on subqueries. Would it be possible to support uses like:

{
  results (func: ...) {
    predicate1 @cascade {
      ...
    }
    predicate2 @normalize {
      ...
    }
  }
}

The error I get when trying this on v0.8.3 is:

"errors": [
        {
            "code": "ErrorInvalidRequest",
            "message": "Cannot have children for attr: [predicate] with lang tags: [cascade]"
        }
    ]

(or similar error for normalize)

1 Like

Could you create a github issue? This seems like a reasonable feature to have.

Just created issue: Support for @cascade and @normalize directives for subqueries · Issue #1755 · dgraph-io/dgraph · GitHub. Thanks!

Let’s continue in Github.