This is my basic schema
type user{
name:string
category:[category]
}
type category
{
cname:string
userId:String
}
==============================
String triples=" :"+userName+" <name> “”+userName+"" .\n :"+userName+" <dgraph.type> “user” .\n" +
" :"+categoryName+" <cname> “”+categoryName+"" .\n"+
" :"+categoryName+" <dgraph.type> “category” .\n"+
" :"+categoryName+" <userId> “”+userName+"" .\n"+
" :"+userName+" <category> _:"+categoryName+" .\n";
i am trying to mutate the data to dgraph using
DgraphProto.Mutation =
DgraphProto.Mutation.newBuilder()
.setSetNquads(ByteString.copyFromUtf8(triples))
.build();
DgraphProto.Request request=DgraphProto.Request.newBuilder()
.addMutations(mu)
setCommitNow(true)
.build();
response=txn.doRequest(request);
so when i check for the uid’s for the same username it creates two seperate nodes or uid what am i missing
Note:Underscores in triples are in place just some editing issue while placing here