Queries
See Advanced Queries for detailed query patterns and examples.
Quick Reference
Section titled “Quick Reference”Subsumption Query
Section titled “Subsumption Query”{ q(func: type(Animal)) { name dgraph.type } }Exact Type Query
Section titled “Exact Type Query”{ q(func: exactType(Dog)) { name } }Transitive Path
Section titled “Transitive Path”{ q(func: eq(name, "SF")) { locatedIn* { name } } }Bounded Transitive Path
Section titled “Bounded Transitive Path”{ q(func: eq(name, "SF")) { locatedIn*2 { name } } }Inferred Facets
Section titled “Inferred Facets”{ q(func: type(Dog)) { dgraph.type @facets(owl.inferred) } }Nested Traversal
Section titled “Nested Traversal”{ q(func: type(Prophecy)) { reference fulfilledBy { reference inBook { name } } hasTheme { name } }}For the full DQL reference, see DQL Query Language.