Skip to main content
Version: 10.x

Step3

ts
const trpc = createTRPCProxyClient<AppRouter>({
links: [
httpBatchLink({
url: 'http://localhost:3000',
}),
],
});
 
const res = await trpc.greeting.query({ name: 'John' });
const res: `Hello ${string}`
ts
const trpc = createTRPCProxyClient<AppRouter>({
links: [
httpBatchLink({
url: 'http://localhost:3000',
}),
],
});
 
const res = await trpc.greeting.query({ name: 'John' });
const res: `Hello ${string}`