dgraph-orm icon indicating copy to clipboard operation
dgraph-orm copied to clipboard

Need a way to delete only edge between two nodes

Open andrejpavlovic opened this issue 5 years ago • 0 comments

Sample data:

const data = [
  {
    uid: '0x1',
    'Person.name': 'John'
  },
  {
    uid: '0x2',
    'Person.name': 'Jane',
    'Person.friends': [
      {
        uid: '0x1',
      }
    ]
  }
];

How do I delete only the friends edge between Jane and John? I would just like to generate the following nquad: <0x2> <Person.friends> <0x1>, but if I call anything like jane.friends.delete(john); I get more than just that edge deleted:

<0x1> * * .
<0x2> <Person.friends> <0x1> .

andrejpavlovic avatar Oct 31 '20 18:10 andrejpavlovic