Migrating to V10 from V9
If someone has some ideas on what I might have screwed up when trying to bump tRPC for this public starter please let me know.
https://github.com/chamatt/create-kaol-app/pull/7/files
GitHub
Update server and db dependencies by wezter96 · Pull Request #7 · c...
@chamatt
A start of trying to bump the app to using latest version of @tanstack/react-query, prisma and tRPC.
If I use interop and don't replace the v9 with the v10 stuff I got it to work b...
18 Replies
if there's any specific problems, let us know in more detail
you need to update the frontend too
idk how procedurenames like
get-by-id
works for the proxy thing, you'd probably need to call them like trpc.post['get-by-id'].useQuery(...)
which is kinda whack imo. rename them to be getById for better dx i'd sayyou handle the case and do the renaming???
it concerts everything to camelCase
(not really handling the case, it just applies to every procedure)
awesome
ah thanks a lot for the input, I'll hopefully have time to look more at it this weekend.
It kinda feels like I've misunderstood how I should update the 'me' query in the authRouter.
Before it was a .merge and then a .query and now I only have .query there.
https://github.com/chamatt/create-kaol-app/pull/7/files#diff-1737fd1080cbf94128d1b86db71d32f715ff7b0909d374e6de1d71f7a596e3cc
GitHub
Update server and db dependencies by wezter96 · Pull Request #7 · c...
@chamatt
A start of trying to bump the app to using latest version of @tanstack/react-query, prisma and tRPC.
If I use interop and don't replace the v9 with the v10 stuff I got it to work b...
@julius Do you see an issue with how I've implemented the me query and do you possibly have a solution for it?
Old authRouter:
`
New authRouter:
can you also send the protectedProcedure?
with nextauth it should look something like this https://github.com/t3-oss/create-t3-app/blob/next/cli/template/addons/trpc/auth-server-utils.ts
GitHub
create-t3-app/auth-server-utils.ts at next · t3-oss/create-t3-app
Quickest way to start a new web app with full stack typesafety - create-t3-app/auth-server-utils.ts at next · t3-oss/create-t3-app
im not sure if you can do this try replacing with
or this should probably also work
Did you see an issue with my "me" query in the authrouter as well?
It previously had a .merge and now it doesn't 🤔
merge means it was a router, not sure why you had a router with a query called '' 🤔
I didn't create any of this, I'm just trying to bump a starter someone else created.
https://github.com/chamatt/create-kaol-app
GitHub
GitHub - chamatt/create-kaol-app: Kaol Stack - Prisma, Expo, Next, ...
Kaol Stack - Prisma, Expo, Next, TRPC, Solito, Tailwind - A monorepo template for a truly universal app - GitHub - chamatt/create-kaol-app: Kaol Stack - Prisma, Expo, Next, TRPC, Solito, Tailwind -...
it will be called in a similar way now,
trpc.auth.me.useQuery()
It's the only starter that I've found that has implemented screen sharing well between the web and mobile that also use tRPC and DB integration.
I'd probably have gone with the t3 turbo starter otherwise.