How to delete values with setDeleteJson without a read query?

I’m looking for a way to do the JSON equivalent of:

{
  delete {
    <0xbeef> <predicate> * .
  }
}

That is, a way to delete a predicate without knowing its value. I’ve discovered through experimentation that you can delete using setDeleteJson({uid: '0xbeef', predicate: 'value'}) if you know that predicate == ‘value’. I’m looking for a way to delete the predicate without knowing the value ahead of time, however. In case it matters, the predicate I’m trying to delete is part of a type.

I’m hoping to avoid switching to nquads whatever way possible to avoid introducing multiple ways to mutate values in my code.

I’m running Dgraph 1.1.0 (ef7cdb28).

https://docs.dgraph.io/mutations/#deleting-edges

Here’s how to do S P * deletion in JSON format:

{"uid": "0xbeef", "predicate": null}

Interesting. That isn’t working for me, sounds like I need to dig in further and make a repro case. It might be a problem with my subsequent queries used to verify that the value is indeed gone.

I believe I found the problem. I needed to delete using {"uid": "0xbeef", "predicate": null, "dgraph.type": "TypeName"}. Without the type, the predicate sort of remained (only in reverse). I can try to come up with a proper repro but I consider this resolved: I’ll be sure to always specify dgraph.type in every delete I run.