I am trying to create a type system in my graph so I can more easily navigate and understand the different kinds of things in it.
I have read this and have some questions:
https://docs.dgraph.io/howto/#giving-nodes-a-type
- Is this advice of avoiding a single type property still valid?
Even if I have multiple type properties, e.g. type.foo, type.bar etc…, there will be certain types that have orders of magnitude more nodes connected to them than others, and I suspect this will be the case in many applications. In that scenario, do I still gain something by splitting up types into multiple properties?
Also, this PR seems to be going in the opposite direction.
In my current implementation (one type(uid) property) I get all instances of a type this way:
{
isa(func: has(type)) @cascade {
uid
name
type @filter(uid(0x2712))
}
}
- If I use multiple type.* properties to denote types, are there any performance penalties in querying depending on the schema data type of the property?
I.e. are time, string or uid data types for the type.foo property equally performant when querying with has(type.foo).
Thanks
Michael