Skip to content

Support for @cascade and @normalize directives for subqueries #1755

@cyphercider

Description

@cyphercider

Per original thread at: https://discuss.dgraph.io/t/support-for-cascade-and-normalize-directives-for-subqueries/1944

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)

Metadata

Metadata

Assignees

Labels

area/querylangIssues related to the query language specification and implementation.area/querylang/cascadeRelated to the cascade directive.area/querylang/normalizeRelated to the normalize directive.kind/enhancementSomething could be better.popularpriority/P2Somehow important but would not block a release.status/acceptedWe accept to investigate/work on it.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions