Using proxyClient in vercel edge function
Hey guys, i want to call my trpc apis inside vercel edge functions.
Edge runtime does not have all supported libraries so i need to use a lot of low level javascript apis. Right now i can do everything with the fetch api.
For typesafety i wanted to use vanilla javacsript proxy. I created the proxy and wanted to call the api but keep gettings json errors ? Is the vanilla proxy client able to run on edge runtime ?
I provided the code. The first line is with the working fetch api and the second one with the proxy which creates an error.
My guess is that the proxy client is not able to run on edge runtime ?
0 Replies