We’re overhauling Dgraph’s docs to make them clearer and more approachable. If you notice any issues during this transition or have suggestions, please let us know.
With the @normalize
directive, Dgraph returns only aliased predicates and
flattens the result to remove nesting.
Query Example: film name, country, and first two actors (by UID order) of every
Steven Spielberg movie, without initial_release_date
because no alias is
given, and flattened by @normalize
.
You can also apply @normalize
on nested query blocks. It works similarly but
only flatten the result of the nested query block where @normalize
has been
applied. @normalize
returns a list irrespective of the type of attribute on
which it’s applied.
We’re overhauling Dgraph’s docs to make them clearer and more approachable. If you notice any issues during this transition or have suggestions, please let us know.
With the @normalize
directive, Dgraph returns only aliased predicates and
flattens the result to remove nesting.
Query Example: film name, country, and first two actors (by UID order) of every
Steven Spielberg movie, without initial_release_date
because no alias is
given, and flattened by @normalize
.
You can also apply @normalize
on nested query blocks. It works similarly but
only flatten the result of the nested query block where @normalize
has been
applied. @normalize
returns a list irrespective of the type of attribute on
which it’s applied.