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
Copy file name to clipboardExpand all lines: README.md
+34-10Lines changed: 34 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,27 +1,50 @@
1
-
webrpc-gen Typescript templates
2
-
===============================
1
+
# webrpc-gen Typescript templates
3
2
4
3
This repo contains the templates used by the `webrpc-gen` cli to code-generate
5
4
webrpc Typescript server and client code.
6
5
7
6
This generator, from a webrpc schema/design file will code-generate:
8
7
9
8
1. Client -- an isomorphic/universal Typescript client to speak to a webrpc server using the
10
-
provided schema. This client is compatible with any webrpc server language (ie. Go, nodejs, etc.).
11
-
As the client is isomorphic, means you can use this within a Web browser or use the client in a
12
-
server like nodejs -- both without needing any dependencies. I suggest to read the generated TS
13
-
output of the generated code, and you shall see, its nothing fancy, just the sort of thing you'd
14
-
write by hand.
9
+
provided schema. This client is compatible with any webrpc server language (ie. Go, nodejs, etc.).
10
+
As the client is isomorphic, means you can use this within a Web browser or use the client in a
11
+
server like nodejs -- both without needing any dependencies. I suggest to read the generated TS
12
+
output of the generated code, and you shall see, its nothing fancy, just the sort of thing you'd
13
+
write by hand.
15
14
16
15
2. Server -- a nodejs Typescript server handler. See examples.
17
16
17
+
## Features
18
+
19
+
### Query Keys for React Query / SWR
20
+
21
+
The generated client includes a `queryKey` property with type-safe query key generators for each endpoint. This makes it easy to use with popular data-fetching libraries:
0 commit comments