T
tRPC

SyntaxError Unexpected token u in JSON at position 0 with mutations

SyntaxError Unexpected token u in JSON at position 0 with mutations

Jjaiv10/13/2022
I'm trying to use trpc client to await a mutation and just keep getting this error. everything works if i change the mutations into queries
UUUnknown User10/13/2022
Message Not Public
Sign In & Join Server To View
Jjaiv10/14/2022
i'll send more info tomorrow
Jjaiv10/20/2022
@oscartbeaumont i went back to working on this and here is more information. this user.auth works as a query, but when switched to a mutation it breaks with these errors. i am using the client api
Jjaiv10/20/2022
it seems like the "u" in the json error is referring to undefined somewhere, but the payload is sending correctly
Jjaiv10/21/2022
the links and transformer
Jjaiv10/30/2022
i had a middleware that was assuming requests were queries and parsing the input json. that caused issues when using mutations

Looking for more? Join the community!

T
tRPC

SyntaxError Unexpected token u in JSON at position 0 with mutations

Join Server
Recommended Posts
Losing the type between the client and serverHello everyone, I am new to tRPC and the magic of types in typescript so I am looking for ideas as tMobile app with tRPCWhat's the suggested way of working with tRPC when it comes to mobile apps? How do you ensure that yHow to use trpc react hooks from an external data sourceHi, I have a monorepo, nextjs and keystone cms. The cms has trpc running, and I managed to get it coNextJS & Keystone CMS, issues when connecting both in a monorepoHello everyone, so I have a monorepo with NextJS and keystone cms, both are running trpc v10beta.15Best practices for implementing an offline applicationHey there! I'm building a full stack react-native app with Expo and a tRPC backend. I'd like for thisomehow when move typed function out of the router files, frontend infer type to be any ?this is inferred corrected since they are in the same file. ``` getX: t.procedure.query(() => { retBig companies that use tRPC?Some of my fellow colleagues were wondering if there are any big companies that use tRPC and how matMigrating to V10 from V9If someone has some ideas on what I might have screwed up when trying to bump tRPC for this public sAuthentication broke after bump to v10 from v9Anyone that has any suggestions on what might have caused this? I get the following error when tryiShow a spinner when any mutation is loading?Looking to show an activity spinner in the header of our application whenever a mutation is in flighSharing schemas between server and clientIn a typical nextJs setup, what is the idiomatic way to share zod schemas between frontend and backev10 Migration interop, router doesnt have attributesHi, i've tried to migrate like stated in the docs, these are my routers. Question: Shouldn't appRoutRecommended file structure for next.js?Hey all - using tRPC heavily with next.js and it's great. Our main `[trpc].ts` file is getting huge Unhandled Runtime ErrorTRPCClientErrorCall Stack Function.from node_modules\@trpc\client\dist\TRPCClientError-09b8a26b.esm.js (57:0) trans