sh03S
tRPC14mo ago
3 replies
sh03

`useSuspenseQuery` with Remix causes weird "Failed to parse URL from /api" errors

I'm using tRPC with Remix (no loaders, just a client app) and as soon as I converted my codebase from
useQuery
to
useSuspenseQuery
I'm now getting
"Failed to parse URL from /api".
errors in my console and server. It seems as though the queries are being run on the server for some reason (where
/api
cannot be parsed because
window.location
is not available).

Any ideas what's going on? Is this intended behaviour?
Was this page helpful?