const { data: attribute } = await axios({
method: "GET",
url: getApiServerUrl() + "/trpc/db.getAttribute",
params: {
input: JSON.stringify(trpcInput)
},
headers: { 'Cookie': cookie }
});
export const getClientWithCookie = ({cookie}: {cookie: string}) => createTRPCProxyClient<AppRouter>({
links: [
httpBatchLink({
url: getApiServerUrl() + /trpc,
headers() {
return {
cookie: cookie,
};
},
}),
],
});
const attribute = await getClientWithCookie({cookie: cookie}).db.getAttribute.query(trpcInput);