Closed aleksnied closed 4 years ago
@aleksnied Could you delete this row from the Playground and see if that helps?
Alternativetly, if you open the query editor for this model (using the little arrow to the right of the model name, next to the Rerun button), and remove the problematic field from the query, I think you should be able to see the result without that column and delete it then.
Let me know if I misunderstood! :D
Hey!
Thanks for the reply. I couldn't delete this row in the playground because I couldn't fulfil its WhereUniqueInput! (Since it has no id)
But the other trick worked! I removed all required fields from the query, which allowed me to click the row in the result and delete it in the console. Now the main query with the required fields works.
Bit fiddly but that way round worked! Thanks :) You might want to look at being able to edit/delete rows that don't fulfil their requirements.
@aleksnied Yep, we've been working on a few significant improvements, and I'll take that into account!
I have a service running on a prisma dev server.
I had just changed the datamodel, adding some fields to one of my types. I cleared out all the objects of that type in the console to start from scratch with the data. That went ok.
I then proceeded to clear out another type that linked to this altered type. After selecting and deleting all rows of this other type via the console, I realised there was one row leftover: an empty row.
The admin console currently shows an error when I open this type in admin:
[ { "message": "Cannot return null for non-nullable type (line 5, column 5):\n user {\n ^", "path": [ "cartItems", 0, "user" ], "locations": [ { "line": 5, "column": 5 } ] } ]
I assume the problem is that the empty row has a null value for a required property- a link to the user type.
The empty row is visible in the table above normally populated rows. Clicking on it does not open the editing menu, there is no way to delete it.
Curiously, when I query this type in the playground, the query comes back ok, showing only the correct populated nodes.
I can't delete or edit this empty row, since I can't enter null values in its WhereUniqueInput.
Following engaging with your customer support, I tried clearing the browser cache for prisma, that didn't help.
Here is my data model. The type that was altered was
Item
and the type that is giving me trouble isCartItem
: