Well, whoever is responsible for database administration has to define these things.
There’s a new feature now, which I’m not sure could be useful. That is “
expand(myDefinedType)”. Maybe it could be used to a sort of debug the node and know which type it belongs to. But I don’t know yet if it would be useful for that.
As I said, Admin needs to define Types. You can find out what types there are by going to the “Schema” panel in Ratel UI. And every mutation you make must contain <dgraph.type>. Otherwise, it won’t work.
Also, if you need a “quick migration”. You can use the Upsert Block.
v as var(func: has(username)) #Make sure this predicate is used only by "Persons"
# Adding the dgraph.type based in the given Predicate.
uid(v) <dgraph.type> "Person" .
You can also do combinations in the query to do precise upserts.