Alexander Braunreuther
01/11/2021, 9:54 AMArgument id: Got invalid value 10 on prisma.updateOneUser. Provided Int, expected String.
when trying to update a entry an connect it's relation. Here you can find the schema and the update call. Am I doing something wrong?Ryan
01/11/2021, 10:01 AMInt
to userId
?
If so, you would need to pass 10
as a String.Alexander Braunreuther
01/11/2021, 10:09 AM{
"where": {
"id": "79M4NDLgejkZSShtdJDuvD"
},
"data": {
"organization": {
"connect": {
"id": 10
}
}
}
}
Ryan
01/11/2021, 10:14 AMprisma generate
and try again?Alexander Braunreuther
01/11/2021, 10:40 AMRyan
01/11/2021, 10:43 AMAlexander Braunreuther
01/11/2021, 10:59 AM@prisma/client
package. CI (I'm using firebase functions which use a build step internally) normally caches the node_modules - so it did with the firstly generated prisma client aswell.
In my first aproach the organizationId was a string uuid. Now as the client on my computer is a new one with a Int based id it accepts it and the code looks alright, but the server has an outdated prisma client.
So you need to make sure, that the client gets generated on every build.Ryan
01/11/2021, 11:00 AMprisma generate
to the postinstall
hook in your package.json
so that it always runs.