Hi. One of my users managed to do something very w...
# prisma-whats-new
m
Hi. One of my users managed to do something very weird yesterday. I have an Event and EventType Types. Event has a required evenType relation. The user managed to create an Event without an eventType (even though it is set as required in the schema). So the result was I couldn’t open the type in the data explorer + all the queries to the type seemed to fail. I managed to fix it by setting the relation as not required and manually assigning the value and then setting it back as required. The project id is: cj6dot2vz3du90121dvxaaqlo and it happened 22.09 between 19.30 - 20.30 UTC
And it happened again
I seem to have figured out what caused it but it should not probably happen.
request id: eu-west-1simplecj7x0f4qsk61y0113fl7ama3p
What happens when you do a nested mutation like this: { type: {…values}, typeId: null } is that that the mutation gets an error but the mutation is carried out anyway so when the type is set as required it will be set to null in the data violating the data integrity
n
hey @meikoudras thanks a lot for brining this up - I'm sorry for the inconvenience, we are working on improving how nested mutations work so this shouldn't happen in the future