A query builder for dgraph.
import "github.com/nicklanng/plusminus"
PlusMinus helps to compose query statements for dgraph, especially in cases that queries must be built bit by bit.
The library only creates a query string, which can be then passed to something like github.com/dgraph-io/dgo.
import pm "github.com/nicklanng/plusminus"
q := pm.Query("queryfriends").Blocks(
pm.Block("data", pm.Eq("name", "Alice")).Predicates(
pm.Predicate("name"),
pm.Predicate("friend").Facets("close").Predicates(
pm.Predicate("name"),
pm.Predicate("car").Facets(),
),
),
).String()