You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|**SSR RPC bridge**| Call `api.module.method()` from client components in Next.js / TanStack Start **without** exposing the backend URL, paths, or OpenAPI to the browser |
88
+
|**RPC batching**| Coalesce same-tick bridge calls into one round-trip; each sub-call validated + authorized individually |
89
+
|**RPC rate limiter**| Built-in `createRateLimiter` for the handler `onRequest` (per-IP / per-session, pluggable store) |
90
+
|**Streaming**|`ctx.stream()` → `AsyncIterable` for NDJSON / SSE / raw byte streams (client-side) |
91
+
|**Modules beyond HTTP**|`ctx.run()` runs any async logic with opt-in queue/dedup/retry/timeout; `ctx.emit` / `ctx.logger` / `ctx.config`|
Pass an `AbortSignal` as usual — `api.pet.getPetById({ petId }, { signal })`. The
1180
+
Pass an `AbortSignal` as usual — `api.products.getProductById({ id }, { signal })`. The
1174
1181
signal is **not** sent over the wire (it isn't serializable); it's honored
1175
1182
locally and rejects the promise with an `AbortError` on abort.
1176
1183
@@ -1189,7 +1196,7 @@ The handler enforces all of the following before dispatch:
1189
1196
| Error leakage | Only `{ name, status, code, message }` cross the wire; stacks, request URLs, and headers never do (`details` only when `dev: true`) |
1190
1197
1191
1198
> **Note:** the bridge client *type* mirrors your whole API surface, so
1192
-
> `api.pet.deletePet(...)` still type-checks even if it isn't exposed — the
1199
+
> `api.products.deleteProduct(...)` still type-checks even if it isn't exposed — the
1193
1200
> `expose` allowlist is the runtime gate, and an un-exposed call is denied.
1194
1201
1195
1202
A complete, runnable example lives in [`examples/nextjs`](./examples/nextjs).
0 commit comments