You should not do that for that case.
Users - is not part of Dgraph’s Schema. For you is just a representation of the type of node for users (I believe so, I don’t know Go). You could only do this in “OwnerUserID” as in your first example.
OwnerUserID is the relationship predicate (it’s your “belongs”) that you have between two or more nodes. So is just what you should use to relate the user and the Post or comments and etc.
If you do anything out of the ordinary, sure Dgraph will create empty Nodes. It is not even creating “Users” because this certainly does not exist in Schema within the Dgraph. Only in your application.
The idea is if you are creating a new post and informing a new “Users” the Client will create a new node for each. The right thing is for you to relate to an existing User node. As in the first example. In the second example you are “forcing” (I believe) the creation of a new post and a new user.
Repeating: Users to be unique, can only have relations via predicates. Every time you use a structure to create multiple Nodes. Will create a new user and post nodes.
For me seems not to be a relation through predicate.
You should treat each node separately. I’ve never used the Go client, but I assume it’s the same as the others.