Dynamically generate url for httpBatchLink
Hey there 👋 is it possible to generate a url for httpBatchLink instead of hardcoding one? I attempted the below code, but this doesn't work. Understandably, the fallback value is used for
url
each time the component mounts.
I believe that I wouldn't even need a useEffect if I wasn't using Next, as I could directly grab these values from window.location
, but since I'm using SSR, this code doesn't make it through the SSR pass.
1 Reply
Currently, this seems to work, however if it's likely that the fallback value would ever be used here as opposed to the return of
getUrl()