gitlw commented :
@hherman1 It seems that the deletion in NQuads format works fine. Here is a simple example
- creating a simple schema
curl localhost:8180/alter -XPOST -d '
name: string @index(exact) .
friend: uid @reverse .
'
- Insert some data
curl 'localhost:8180/mutate' -H 'Content-Type:application/rdf' -H 'X-Dgraph-CommitNow: true' -XPOST -d '{
set {
_:alice <name> "Alice" .
_:bob <name> "Bob" .
_:alice <friend> _:bob .
}
}'
- Query the data and verify that they have been successfully inserted
curl localhost:8180/query -XPOST -d '{
run(func: eq(name, "Alice")) {
uid
name
friend {
uid
name
}
}
}' | python -m json.tool
This will give a result like
{
"data": {
"run": [
{
"friend": [
{
"name": "Bob",
"uid": "0x2"
}
],
"name": "Alice",
"uid": "0x1"
}
]
},
"extensions": {
"server_latency": {
"encoding_ns": 494108,
"parsing_ns": 16501,
"processing_ns": 407245183
},
"txn": {
"start_ts": 4
}
}
}
- Now we can delete the node with uid 0x01 using deletion in NQuad format
curl 'localhost:8180/mutate' -H 'X-Dgraph-CommitNow: true' -H 'Content-Type:application/rdf' -XPOST -d '{
delete {
<0x01> * * .
}
}'
- If we run the query above again, the node representing “Alice” will be gone.
Am I missing something? Thanks!