I had some bad data when importing using live loader (my fault). I need to delete all of the relations to these empty nodes. The only thing they contain is a uid. They were not specified a dgraph.type or any other properties as I mistyped their blank node in the script.
How can I find nodes that only have a uid and nothing else? I know it will be bad performance, but it will not be a frequent query.
Not sure if I got your question. This query is an example of a fixed query. The preds have to be manually added to the query. There’s no way, as far as I know, to do it automatically.
As has() func doesn’t support multiple predicates as params or variables with predicates. You have to manually add it.
but my nodes don’t have any predicates. They are basically just an empty node with uid only. There are other nodes that have them as children and I need to delete them globally to resolve grpahql errors with missing required fields when it links to these empty nodes.
Oh, you wanna find “empty nodes”. From the way you said it, I thought you wanted any nodes with some information. So in your case, you wanna find “dangling empty nodes”.