Struggled at making upsert with assignment via the dgo client


How can I do mutation like this below with dgo client?

  upsert {
    query {
      v as var(func: eq(xid, "6459f458-8938-463a-b9b9-9c044a1d2e61")) {
        LINK as ~link
    mutation {
      delete {
        uid(LINK) <link> uid(v) .
        uid(v) * * .

You can get examples from the test file

Thank you, this works. Still, I see lots of these kind of question at your discussions list. And this is rather your fault.

Sorry? If you have any constructive suggestions. Please do.

We decided not to use Dgraph, still I have some points, hope they will help you:

  1. The documentation is mostly about usual things pretty much every DB does: filtering, aggregation, etc. I think I would choose another established DB if I only needed these.
  2. I would consider Dgraph only if I needed graph operations: add a node, connect two nodes, delete a node with all incoming and outgoing connections, disconnect two nodes, traversals, shortest paths. The documentation on these is pretty poor. Especially about node removal.
  3. It is not clear how to translate queries into client requests.

PS Your query language of choice is truly special. In a bad sense. I could leave with it though.

1 Like

Thank you, I gonna take your comments into consideration. I agreed with some of them, above. That’s a thing we are working on. We indeed need to revamp the documentation and we have some internal track for this.