SSR RPC Bridge
Client component → Server Action → real API. The backend URL and paths never reach the browser. Watch the Network tab: only POST /.
1 · Direct read — api.products.getProductById
The returned product has no images — redacted by transformResult.
Click “Fetch product” to call the bridge.
2 · Direct write + authz
Editor session:OFF
With editor OFF the authorize hook denies the write. Turn it ON, then add.
—
5 · Batching — three reads, one round-trip
The browser client coalesces same-tick calls; the server validates each sub-call individually.
—
6 · TanStack Query
Loading matches…
7 · TanStack Mutation
See /http for the generic httpTransport variant and /server for direct server-side usage.