About this point. If you are inserting data via DQL. You should add a “prefix” to your DQL mudation. e.g:
{
"uid": "_:p1",
"dgraph.type": "Person",
"Person.name": "John",
"Person.friends": [
{
"uid": "_:p2"
},
{
"uid": "_:p3"
}
]
},
Dgraph’s GraphQL has this prefix for each entity. But is better you do it via GraphQL itself.