calling tRPC procedure from custom link
what is the best way to call a procedure from a custom link? I see in https://github.com/pyncz/trpc-refresh-token-link they are using a helper client. I tried the proxy client approach with
await utils.client.auth.refresh.mutate(tokens)
, but getting Error: Unable to find tRPC Context. Did you forget to wrap your App inside withTRPC HoC?
.GitHub
GitHub - pyncz/trpc-refresh-token-link: 🔃 Refresh token link for tR...
🔃 Refresh token link for tRPC client. Contribute to pyncz/trpc-refresh-token-link development by creating an account on GitHub.
1 Reply
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?
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!