@trpc/react-query 10.0.0-rc.2 → 10.0.0-rc.3
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/{createHooksInternal-fdad8a31.js → createHooksInternal-6618ba4a.js} +3 -1
- package/dist/{createHooksInternal-c7df3c94.mjs → createHooksInternal-92c57b9a.mjs} +3 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/shared/index.mjs +1 -1
- package/package.json +6 -6
- package/src/shared/hooks/createHooksInternal.tsx +1 -1
|
@@ -279,7 +279,9 @@ function getClientArgs(pathAndInput, opts) {
|
|
|
279
279
|
}
|
|
280
280
|
function useMutation(path, opts) {
|
|
281
281
|
const { client } = useContext();
|
|
282
|
-
const queryClient = reactQuery.useQueryClient(
|
|
282
|
+
const queryClient = reactQuery.useQueryClient({
|
|
283
|
+
context: ReactQueryContext
|
|
284
|
+
});
|
|
283
285
|
const hook = reactQuery.useMutation((input)=>{
|
|
284
286
|
const actualPath = Array.isArray(path) ? path[0] : path;
|
|
285
287
|
return client.mutation(...getClientArgs([
|
|
@@ -273,7 +273,9 @@ function getClientArgs(pathAndInput, opts) {
|
|
|
273
273
|
}
|
|
274
274
|
function useMutation$1(path, opts) {
|
|
275
275
|
const { client } = useContext();
|
|
276
|
-
const queryClient = useQueryClient(
|
|
276
|
+
const queryClient = useQueryClient({
|
|
277
|
+
context: ReactQueryContext
|
|
278
|
+
});
|
|
277
279
|
const hook = useMutation((input)=>{
|
|
278
280
|
const actualPath = Array.isArray(path) ? path[0] : path;
|
|
279
281
|
return client.mutation(...getClientArgs([
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var client = require('@trpc/client');
|
|
6
6
|
var shared = require('@trpc/server/shared');
|
|
7
7
|
var React = require('react');
|
|
8
|
-
var createHooksInternal = require('./createHooksInternal-
|
|
8
|
+
var createHooksInternal = require('./createHooksInternal-6618ba4a.js');
|
|
9
9
|
require('@tanstack/react-query');
|
|
10
10
|
require('./getArrayQueryKey-a2092b3c.js');
|
|
11
11
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from '@trpc/client';
|
|
2
2
|
import { createFlatProxy } from '@trpc/server/shared';
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
|
-
import { c as createHooksInternal, a as createReactQueryUtilsProxy, b as createReactProxyDecoration } from './createHooksInternal-
|
|
4
|
+
import { c as createHooksInternal, a as createReactQueryUtilsProxy, b as createReactProxyDecoration } from './createHooksInternal-92c57b9a.mjs';
|
|
5
5
|
import '@tanstack/react-query';
|
|
6
6
|
import './getArrayQueryKey-062214e0.mjs';
|
|
7
7
|
|
package/dist/shared/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var createHooksInternal = require('../createHooksInternal-
|
|
5
|
+
var createHooksInternal = require('../createHooksInternal-6618ba4a.js');
|
|
6
6
|
var queryClient = require('../queryClient-83576230.js');
|
|
7
7
|
require('@trpc/server/shared');
|
|
8
8
|
require('@tanstack/react-query');
|
package/dist/shared/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as createHooksInternal, b as createReactProxyDecoration, a as createReactQueryUtilsProxy } from '../createHooksInternal-
|
|
1
|
+
export { c as createHooksInternal, b as createReactProxyDecoration, a as createReactQueryUtilsProxy } from '../createHooksInternal-92c57b9a.mjs';
|
|
2
2
|
export { g as getQueryClient } from '../queryClient-0569f6e0.mjs';
|
|
3
3
|
import '@trpc/server/shared';
|
|
4
4
|
import '@tanstack/react-query';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trpc/react-query",
|
|
3
|
-
"version": "10.0.0-rc.
|
|
3
|
+
"version": "10.0.0-rc.3",
|
|
4
4
|
"description": "tRPC React lib",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -51,15 +51,15 @@
|
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"@tanstack/react-query": "^4.3.8",
|
|
54
|
-
"@trpc/client": "10.0.0-rc.
|
|
55
|
-
"@trpc/server": "10.0.0-rc.
|
|
54
|
+
"@trpc/client": "10.0.0-rc.3",
|
|
55
|
+
"@trpc/server": "10.0.0-rc.3",
|
|
56
56
|
"react": ">=16.8.0",
|
|
57
57
|
"react-dom": ">=16.8.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@tanstack/react-query": "^4.3.8",
|
|
61
|
-
"@trpc/client": "10.0.0-rc.
|
|
62
|
-
"@trpc/server": "10.0.0-rc.
|
|
61
|
+
"@trpc/client": "10.0.0-rc.3",
|
|
62
|
+
"@trpc/server": "10.0.0-rc.3",
|
|
63
63
|
"@types/express": "^4.17.12",
|
|
64
64
|
"@types/node": "^18.7.20",
|
|
65
65
|
"express": "^4.17.1",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "14aa82ef679172aaa41611eff48ed0cc1199c056"
|
|
75
75
|
}
|
|
@@ -458,7 +458,7 @@ export function createHooksInternal<
|
|
|
458
458
|
TContext
|
|
459
459
|
> {
|
|
460
460
|
const { client } = useContext();
|
|
461
|
-
const queryClient = useQueryClient();
|
|
461
|
+
const queryClient = useQueryClient({ context: ReactQueryContext });
|
|
462
462
|
|
|
463
463
|
const hook = __useMutation(
|
|
464
464
|
(input) => {
|