We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66d4d3b commit 2b4aaf0Copy full SHA for 2b4aaf0
apps/content/docs/client/client-side.md
@@ -76,3 +76,19 @@ const planet = await client.planet.find({ id: 1 })
76
client.planet.create
77
// ^|
78
```
79
+
80
+## Merge Clients
81
82
+In oRPC, a client is a simple object-like structure. To merge multiple clients, you simply assign each client to a property in a new object:
83
84
+```ts
85
+const clientA: RouterClient<typeof routerA> = createORPCClient(linkA)
86
+const clientB: RouterClient<typeof routerB> = createORPCClient(linkB)
87
+const clientC: RouterClient<typeof routerC> = createORPCClient(linkC)
88
89
+export const orpc = {
90
+ a: clientA,
91
+ b: clientB,
92
+ c: clientC,
93
+}
94
+```
0 commit comments