@kubb/plugin-react-query 5.5.0-canary.20261014T114046 → 5.5.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/dist/index.cjs +6 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/docs/options.md +13 -11
- package/package.json +6 -6
package/docs/options.md
CHANGED
|
@@ -11,7 +11,7 @@ Pass these options to `pluginReactQuery()`. Shared options link to [Shared plugi
|
|
|
11
11
|
| [`client`](#client) | Which registered client plugin the hooks call. | Auto-detected |
|
|
12
12
|
| [`infinite`](#infinite) | Generate `useInfiniteQuery` hooks for pagination. | `false` |
|
|
13
13
|
| [`suspense`](#suspense) | Generate `useSuspenseQuery` hooks. | `false` |
|
|
14
|
-
| [`query`](#query) | Configure the query hooks. | `{ methods: ['GET'], importPath: '@tanstack/react-query' }`
|
|
14
|
+
| [`query`](#query) | Configure the query hooks. | `{ methods: ['GET', 'QUERY'], importPath: '@tanstack/react-query' }` |
|
|
15
15
|
| [`queryKey`](#querykey) | Build the `queryKey` for each query hook. | Built-in `queryKeyTransformer` |
|
|
16
16
|
| [`mutation`](#mutation) | Configure the mutation hooks. | `{ methods: ['POST', 'PUT', 'PATCH', 'DELETE'], importPath: '@tanstack/react-query' }` |
|
|
17
17
|
| [`mutationKey`](#mutationkey) | Build the `mutationKey` for each mutation hook. | Built-in `mutationKeyTransformer` |
|
|
@@ -154,21 +154,23 @@ Adds `useSuspenseQuery` hooks next to the regular query hooks. Pass `{}` to turn
|
|
|
154
154
|
|
|
155
155
|
Which operations become queries, emitting a `queryOptions` factory by default. Pass `false` to skip, or set [`hooks`](#hooks) to also emit `useQuery`.
|
|
156
156
|
|
|
157
|
-
| |
|
|
158
|
-
| -------- |
|
|
159
|
-
| Type | `Partial<Query> \| false`
|
|
160
|
-
| Required | `false`
|
|
161
|
-
| Default | `{ methods: ['GET'], importPath: '@tanstack/react-query' }` |
|
|
157
|
+
| | |
|
|
158
|
+
| -------- | -------------------------------------------------------------------- |
|
|
159
|
+
| Type | `Partial<Query> \| false` |
|
|
160
|
+
| Required | `false` |
|
|
161
|
+
| Default | `{ methods: ['GET', 'QUERY'], importPath: '@tanstack/react-query' }` |
|
|
162
162
|
|
|
163
163
|
#### query.methods
|
|
164
164
|
|
|
165
165
|
HTTP methods treated as queries.
|
|
166
166
|
|
|
167
|
-
| |
|
|
168
|
-
| -------- |
|
|
169
|
-
| Type | `Array<string>`
|
|
170
|
-
| Required | `false`
|
|
171
|
-
| Default | `['GET']`
|
|
167
|
+
| | |
|
|
168
|
+
| -------- | ------------------ |
|
|
169
|
+
| Type | `Array<string>` |
|
|
170
|
+
| Required | `false` |
|
|
171
|
+
| Default | `['GET', 'QUERY']` |
|
|
172
|
+
|
|
173
|
+
Operations whose method is in neither `query.methods` nor `mutation.methods` get no hook. Keep `'QUERY'` here when overriding the list, or QUERY operations are skipped.
|
|
172
174
|
|
|
173
175
|
#### query.importPath
|
|
174
176
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/plugin-react-query",
|
|
3
|
-
"version": "5.5.0
|
|
3
|
+
"version": "5.5.0",
|
|
4
4
|
"description": "Generate type-safe TanStack Query (React Query) hooks with Kubb. Covers useQuery, useMutation, useInfiniteQuery, and queryOptions with full TypeScript support.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"code-generation",
|
|
@@ -76,13 +76,13 @@
|
|
|
76
76
|
"registry": "https://registry.npmjs.org/"
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
|
-
"@kubb/plugin-ts": "^5.
|
|
79
|
+
"@kubb/plugin-ts": "^5.0.11"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
|
-
"@internals/client": "0.
|
|
83
|
-
"@internals/shared": "0.
|
|
84
|
-
"@internals/tanstack-query": "0.
|
|
85
|
-
"@internals/utils": "0.
|
|
82
|
+
"@internals/client": "0.0.0",
|
|
83
|
+
"@internals/shared": "0.0.0",
|
|
84
|
+
"@internals/tanstack-query": "0.0.0",
|
|
85
|
+
"@internals/utils": "0.0.0",
|
|
86
86
|
"@tanstack/react-query": "^5.104.1",
|
|
87
87
|
"kubb": "^5.9.2"
|
|
88
88
|
},
|