h
h
TtRPC
Created by h on 10/8/2023 in #❓-help
Auth through trpc procedures
I set up this but im not sure if it works I mean its set in my api definition for calling trpc on server components and im calling login mutation on client component
export const api = createTRPCReact<AppRouter>({
overrides: {
useMutation: {
async onSuccess(opts) {
await opts.originalFn()
await opts.queryClient.invalidateQueries()
},
},
},
abortOnUnmount: true,
})
export const api = createTRPCReact<AppRouter>({
overrides: {
useMutation: {
async onSuccess(opts) {
await opts.originalFn()
await opts.queryClient.invalidateQueries()
},
},
},
abortOnUnmount: true,
})
10 replies
TtRPC
Created by h on 10/8/2023 in #❓-help
Auth through trpc procedures
Is it good idea to have separate api declaration with httpBatchLink just for actions that requires setting headers?
10 replies
TtRPC
Created by h on 10/8/2023 in #❓-help
Auth through trpc procedures
10 replies