Unable to invoke prisma mutation to planetscale dev branch.
Dev branch was created on planetscale and the env variables are set to dev branch values.
works fine and succeeds. Looking at planetscale the new tables/fields are created but when I go to try to invoke the prisma mutation I get the error:
Also for whatever reason in the console on planetscale it says there's a syntax error when typing:
Any idea what's going on?
11 Replies
Did you try to use the PlanetScale proxy for Prisma?
Probably not. Not sure where to set that up.
It's more or less the instructions here: https://planetscale.com/docs/prisma/automatic-prisma-migrations. You basically use the PlanetScale CLI to connect to your branch and change the DATABASE_URL to use the connection
Not sure if that would solve your issue 100%, but that's how I typically use PlanetScale + Prisma and have never had issues with mutations
Alright, I'll give that a shot. I was briefly skimming that while trying to figure things out. I was following along with Theo's T3 tutorial, but he doesn't implement anything with a separate dev environment or use the planetscale cli so wasn't sure if I needed to go that route.
Yeah the
ERROR HY000 (1105): unavailable: unable to connect to branch BRANCH_NAME_HERE
is a little suspect so not sureI replaced the actual branch name for security reasons.
Yeah, I just mean if your push succeeded then the query failing is a bit weird
Right? That's what's got me so confused.
Did you happen to change your ENV file after you had started the application?
I restarted the application and the issue persists.
Sigh, thought I did. Just tried again and now it works. facepalm
Solution
(restarting the application again after )