In DGraph documentation, it is mentioned that we can use expand() function in four ways. One of them is:
Predicates can be stored in a variable and passed to expand()
to expand all the predicates in the variable
Could someone please give an example as to how it can be achieved?
MichelDiz
(Michel Diz)
January 13, 2020, 11:56pm
2
Sorry for the late answer, I missed that one.
This was deprecated since the _predicate_
feature was removed in favor of the new Type System. You can see the usage in the old docs Get started with Dgraph
I think this needs to be removed from docs after some checks. Today, what you can do is use expand type e.g: expand(Person)
UPDATE: Github Issue to track this Remove deprecated expand() feature from docs. · Issue #4561 · dgraph-io/dgraph · GitHub
1 Like
@utekaravinash @MichelDiz I have raised a PR to update docs about expand function.
dgraph-io:master
← dgraph-io:prashant/expand-docs
opened 08:43AM - 18 Feb 20 UTC
Fixes #4561
- Removing docs about the deprecated feature - passing variables … to `expand` function
- Adding example to use `expand` function with type
Signed-off-by: Prashant Shahi <prashant@dgraph.io>
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/dgraph-io/dgraph/4795)
Docs Preview: [<img src="https://bl.ocks.org/prashant-shahi/raw/3a9f99bec84231cfe3c0e82cf883f159/0e588d908ad8c8b10958b87ebdd2ba68779ccf4f/dgraph.svg" height="34" align="absmiddle" alt="Dgraph Preview"/>](https://dgraph-e8d3397e54-44769.surge.sh)
1 Like