Removing edges using null does not work

I have followed this tutorial on how to remove edges from a predicate: Deleting Data | Graphqlschema | Dgraph Tour however it doesn’t work.

My schema looks like:


enum Genre {
	action
	adventure
	animation
	biography
	comedy
	crime
	documentary
	drama
}

type Entry  {
	_id: ID! 
	id: String!  @search(by:[exact]) 
	title: String! @search(by:[regexp]) 
	genres: [Genre] 
}

and when I run this mutation:

mutation MyMutation {
  updateEntry(input: {filter: {id: {eq: "6359231862"}}, remove: {genres: null}}) {
    numUids
  }
}

it errors with

"errors": [
    {
      "message": "mutation updateEntry failed because Dgraph execution failed because Got unsupported type for list: Entry.genres",
      "locations": [
        {
          "line": 9,
          "column": 3
        }
      ],
      "path": [
        "updateEntry"
      ]
    }
  ],
2 Likes

Does anyone have any ideas on how to get this to work?

2 Likes

@core-devs this is a bug!!

2 Likes

I am experiencing the same problem. It gets worse if a node has been deleted before removing an edge, because then removing that edge becomes impossible.

PLEASE AT LEAST ACKNOWLEDGE THE ISSUES BROUGHT UP HERE, DGRAPH TEAM! The utter lack of communication is beyond ridiculous.