@cratestack/adapter-rtk 0.11.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,9 +6,12 @@ through the same runtime and `RpcLink` chain (`@cratestack/link-batch`, `@crates
|
|
|
6
6
|
etc.) the rest of the generated client uses, instead of RTK Query's default `fetchBaseQuery`
|
|
7
7
|
reimplementing the wire protocol.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
`
|
|
11
|
-
|
|
9
|
+
This package is the primitive; `cratestack generate-typescript --rtk` (cratestack#906) generates a
|
|
10
|
+
full `createApi` endpoint set on top of it — `src/rtk-api.ts`'s `createCratestackRtkApi(client)`, one
|
|
11
|
+
entry per model operation and per `procedure`, with `providesTags`/`invalidatesTags` derived from the
|
|
12
|
+
schema rather than hand-written. The hand-written shape below is still exactly what that generated
|
|
13
|
+
code does under the hood, and is the reference for anyone customizing beyond the generator's output
|
|
14
|
+
or writing a `--template-dir` override for `rtk-rpc.ts.j2`.
|
|
12
15
|
|
|
13
16
|
## Usage
|
|
14
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cratestack/adapter-rtk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "An RTK Query BaseQueryFn adapter over CrateStack's generated TypeScript RPC client.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"lint": "biome check ."
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@cratestack/ts-types": "0.
|
|
41
|
+
"@cratestack/ts-types": "0.12.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@reduxjs/toolkit": "^2.0.0"
|