According to this other discussion:
Drop all data from Dgraph - Users / Dgraph - Discuss Dgraph
curl -X POST localhost:8080/alter -d '{"drop_op": "DATA"}'
is the way to drop data without schema, but what’s the equivalent command with the dgraph-js library ?
I’m assuming it’s
op.setDropOp();
But this function seems to accept a number
rajas
(Rajas Vanjape)
2
Hi @scroobius-pip,
Thanks for your question.
Yes, it appears that setDropOp takes a number. I was looking at relevant code in dgraph-js/api_pb.d.ts at master · dgraph-io/dgraph-js · GitHub .
I tried to reproduce this and was able to delete data using op.setDropOp(dgraph.Operation.DropOp.DATA);
I have also reported this back to be included in documentation or example files.
1 Like
rajas
(Rajas Vanjape)
3
1 Like