# What is the correct RDF syntax to delete an edge between two nodes

**URL:** <https://discuss.dgraph.io/t/what-is-the-correct-rdf-syntax-to-delete-an-edge-between-two-nodes/11566>\
**Category:** Dgraph\
**Tags:** mutation, rdf\
**Created:** [November 21, 2020, 1:35am UTC](https://discuss.dgraph.io/t/what-is-the-correct-rdf-syntax-to-delete-an-edge-between-two-nodes/11566 "2020-11-21T01:35:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![amaster507](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/amaster507/32/4123_2.png) [@amaster507](https://discuss.dgraph.io/u/amaster507)\
**Post date:** [November 21, 2020, 1:35am UTC](https://discuss.dgraph.io/t/what-is-the-correct-rdf-syntax-to-delete-an-edge-between-two-nodes/11566/1 "2020-11-21T01:35:59Z")

</div>

Continuing the discussion from [Delete - Mutations](http://discuss.hypermode.com/t/delete-mutations/9791):

There are a lot of posts about deleting. The ones that I found and read deal with deleting through GraphQL, or JSON syntax, or some other client. What I want to do is delete an edge with the RDF triple syntax. `S P O .`

```auto
{
  delete {
    <0x2> <friend> <0x3> .
  }
}

```

Is this correct to delete the edge `friend` between uid `0x2` and `0x3`? There is no mention in this docs page concerning edges between nodes without the wildcard, which I don’t want in this case. I want to preserve the other existing friends. Not sure if I need to use an uid function here instead:

```auto
<0x2> <friend> uid("0x3") .

```

Or just use the uid as a string? All the other `SPO` methods are for predicates and not edges.

```auto
<0x2> <friend> "0x3" .

```

---

<div class="post-metadata">

**Author:** ![Valdanito](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/valdanito/32/1381_2.png) [@Valdanito](https://discuss.dgraph.io/u/Valdanito)\
**Post date:** [November 21, 2020, 1:54am UTC](https://discuss.dgraph.io/t/what-is-the-correct-rdf-syntax-to-delete-an-edge-between-two-nodes/11566/2 "2020-11-21T01:54:23Z")

</div>

> [@amaster507](#):
>
> ```auto
> {
> delete {
> <0x2> <friend> <0x3> .
> }
> }
> 
> ```

This should be right.

---

<div class="post-metadata">

**Author:** ![MichelDiz](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/micheldiz/32/11873_2.png) [@MichelDiz](https://discuss.dgraph.io/u/MichelDiz)\
**Post date:** [November 21, 2020, 2:12am UTC](https://discuss.dgraph.io/t/what-is-the-correct-rdf-syntax-to-delete-an-edge-between-two-nodes/11566/3 "2020-11-21T02:12:23Z")

</div>

> [@amaster507](#):
>
> `<0x2> <friend> uid("0x3") .`

This syntax doesn’t exist in RDF. This is an especial function in the Upsert Block.

> [@amaster507](#):
>
> `<0x2> <friend> "0x3" .`

Also, this isn’t related to an edge. As this is a scalar value.

> [@amaster507](#):
>
> `<0x2> <friend> <0x3> .`

That’s the right syntax. I thought that this would be obvious in the docs. I mention that in the video. Maybe we should improve this @damian, @acarey in the docs.

---

<div class="post-metadata">

**Author:** ![amaster507](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/amaster507/32/4123_2.png) [@amaster507](https://discuss.dgraph.io/u/amaster507)\
**Post date:** [November 21, 2020, 4:45am UTC](https://discuss.dgraph.io/t/what-is-the-correct-rdf-syntax-to-delete-an-edge-between-two-nodes/11566/4 "2020-11-21T04:45:54Z")

</div>

Thanks for the confirmation. The doc page linked does not contain any Node to Node examples other than the wild cards. I was afraid of sending the wrong mutation with a production database.
