I’m using React-Apollo. I have a mutation to creat...
# prisma-whats-new
h
I’m using React-Apollo. I have a mutation to create a record, with a field containing a ‘unique’ constraint. So when I try to add an existing one, I get an error back, which is fine. But it seems to be a string only (error is string, error.message too). How can I find the 3010 error code to know that the error is related to that unique constraint ? Tried error.code but is undefined
n
@herdani
error
should have the
graphQLErrors
object that contains more information
h
perfect, thanks!