Any ideas why TRPC doesnt find the mutation?
I have am trying to use a create many Prisma call in a TRPC mutation as follows:
Which is exported via the following router:
This is how I have setup all my mutations elsewhere. However, this one consistently gives a TRPC error as follows:
Any ideas why this could be happening? My deepdive leads me to believe that this is due to CreateMany but not sure what teh best way to structure such is?
9 Replies
How are you calling the trpc mutation ?
Also are you using mongo or sqlserver ?
Sure, for now its pretty simple
and
Using SQLServer (planetscale)
Okay pscale is mysql i dont think its sql server , but all of this seems fine let me keep digging
prisma says you cant use skipduplicate on sqlserver but I don't think its that since pscale is mysql . But you could try without it
I would go step by step and comment out stuff inside the mutation. make it simple just logging input data and from there expand. I have no clue. everything seems fine at first glance
unfortunately seems to still hit the same error 😦
you can just call a clog mutation
console.log*
thanks, yeah let me try this 🙂 agree, seems odd cause its as i always call other mutations.
did you restart you server ? just in case and or update the libs if there are update.
Damn, I think I found it! Diving into the console log - kept showing 404s (even on new routes I added to my TPRC file). Made me wonder whether 'activity' (as I called it) was a reserved namespace of sorts - seems thats exactly it. Assumed typescript/vscode wouldve complained if it was. Working now with a different name. thanks for the help
Oh interesting…. I wonder why ill look into it thanks for clarifying