Spark
Spark
TtRPC
Created by Spark on 8/31/2024 in #❓-help
calling tRPC procedure from custom link
just import and use the supabase client directly, not from auth-helpers... const { data } = await supabase.auth.getSession(); from import { supabase } from "~/utils/supabase";. oops!
4 replies
TtRPC
Created by Spark on 8/31/2024 in #❓-help
calling tRPC procedure from custom link
currently using a helper vanilla client approach, but if I want to pass supabase auth I may have to wrap app in a second TRPCProvider and try to use the utils of the parent in the custom link of the child provider?
4 replies
TtRPC
Created by Luka on 7/1/2024 in #❓-help
TRPC with Turborepo Nextjs
I have been following https://github.com/t3-oss/create-t3-turbo/tree/main where tRPC is in a separate package like you are saying, and it is hosted on Vercel with the Next.js app. I think the main advantage for a separate package is flexibility. If you wanted to decouple the tRPC API from the Next.js app later you could use the package in a separate tRPC app like https://ion.sst.dev/docs/start/aws/trpc/. This is more complex, but better with scale.
3 replies
TtRPC
Created by carnegiepilled on 1/30/2024 in #❓-help
Why is my tRPC + Next 14 (app router) data fetching pattern not refreshing the UI?
I would take a look at the create-t3-turbo repo and study the data fetching patterns. https://github.com/t3-oss/create-t3-turbo/blob/main/apps/nextjs/src/app/page.tsx Thoughts: 1. not sure if always correct, but I like to keep my pages as server components and import client components if needed 2. to revalidate you can use this https://trpc.io/docs/client/react/useUtils#query-invalidation
4 replies
TtRPC
Created by Spark on 1/30/2024 in #❓-help
optimistic updates tRPC v11 + TanStack Query v5
I am just using the cache approach for now
3 replies