Master DQL (Dgraph Query Language) for complex graph queries, explore the news knowledge graph with Ratel, and integrate Dgraph with agents using Python, JavaScript, and Go clients.
type()
, eq()
, allofterms()
,
etc.)var(func: ...)
)@filter()
)count
, sum
, avg
)@filter
directive:
orderasc
or orderdesc
parameter:
@index
to Article.title
to enable fast
sorting:
Article.published
as a date field. To filter by date:
datetime
index for faster date-based queries:
Topic.name
, enabling text search:
Geo.location
as a geo
field, enabling location-based
queries:
Article.embedding
with an HNSW vector index, allowing
semantic searches:
@cascade
directive@cascade
directive filters out nodes where any of the requested fields are
null or empty:
@facets
directive@filter
directive (with multiple conditions)@recurse
directivesubtopics
predicate to
your schema.
@groupby
@index
directives to the fields used
in @groupby
):
<Article.published>: datetime @index(month)
in the
schema.
datetime
index on Article.published.