Way to delete records with nil non-nullable fields

As I’m playing with Tweetsite, for some reason, I see a bunch of data for User type, which has nil screen_name, which has @ID directive and must be non-nullable as per the schema. I’m not sure why this is happening.

I’d like to remove these records, but currently I have no way to do so, because I can’t identify these records. It’s a Catch-22. To identify which records are these, I need to query their non-nullable screen_name. If I do so, I don’t get the records. I can’t make screen_name nullable, because it has ID directive.

There should be a way to tell Dgraph to clean these up.

1 Like

I think there’s two issues here -

  1. Known bug that you can add null values for @id fields - It's possible to add null values for @id fields
  2. It’s is actually true of anything that’s null at the moment - you can’t query/update/delete for null values. We have a plan lift something like has into GraphQL.
1 Like

Is this the solution you were talking about?