@refinedev/core 4.40.0 → 4.41.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.
Files changed (59) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/components/containers/refine/index.d.ts.map +1 -1
  3. package/dist/esm/index.js +6 -6
  4. package/dist/esm/index.js.map +1 -1
  5. package/dist/hooks/accessControl/useCan/index.d.ts.map +1 -1
  6. package/dist/hooks/auditLog/useLog/index.d.ts.map +1 -1
  7. package/dist/hooks/auditLog/useLogList/index.d.ts.map +1 -1
  8. package/dist/hooks/auth/useForgotPassword/index.d.ts.map +1 -1
  9. package/dist/hooks/auth/useGetIdentity/index.d.ts.map +1 -1
  10. package/dist/hooks/auth/useIsAuthenticated/index.d.ts.map +1 -1
  11. package/dist/hooks/auth/useLogin/index.d.ts.map +1 -1
  12. package/dist/hooks/auth/useLogout/index.d.ts.map +1 -1
  13. package/dist/hooks/auth/useOnError/index.d.ts.map +1 -1
  14. package/dist/hooks/auth/usePermissions/index.d.ts +1 -1
  15. package/dist/hooks/auth/usePermissions/index.d.ts.map +1 -1
  16. package/dist/hooks/auth/useRegister/index.d.ts.map +1 -1
  17. package/dist/hooks/auth/useUpdatePassword/index.d.ts.map +1 -1
  18. package/dist/hooks/data/useCreate.d.ts.map +1 -1
  19. package/dist/hooks/data/useCreateMany.d.ts.map +1 -1
  20. package/dist/hooks/data/useCustom.d.ts.map +1 -1
  21. package/dist/hooks/data/useCustomMutation.d.ts.map +1 -1
  22. package/dist/hooks/data/useDelete.d.ts.map +1 -1
  23. package/dist/hooks/data/useDeleteMany.d.ts.map +1 -1
  24. package/dist/hooks/data/useInfiniteList.d.ts.map +1 -1
  25. package/dist/hooks/data/useList.d.ts.map +1 -1
  26. package/dist/hooks/data/useMany.d.ts.map +1 -1
  27. package/dist/hooks/data/useOne.d.ts.map +1 -1
  28. package/dist/hooks/data/useUpdate.d.ts.map +1 -1
  29. package/dist/hooks/data/useUpdateMany.d.ts.map +1 -1
  30. package/dist/iife/index.js +6 -6
  31. package/dist/iife/index.js.map +1 -1
  32. package/dist/index.js +6 -6
  33. package/dist/index.js.map +1 -1
  34. package/package.json +2 -1
  35. package/src/components/containers/refine/index.tsx +4 -1
  36. package/src/hooks/accessControl/useCan/index.ts +5 -0
  37. package/src/hooks/auditLog/useLog/index.ts +9 -0
  38. package/src/hooks/auditLog/useLogList/index.ts +5 -0
  39. package/src/hooks/auth/useForgotPassword/index.ts +13 -0
  40. package/src/hooks/auth/useGetIdentity/index.ts +11 -0
  41. package/src/hooks/auth/useIsAuthenticated/index.ts +7 -0
  42. package/src/hooks/auth/useLogin/index.ts +13 -0
  43. package/src/hooks/auth/useLogout/index.ts +13 -0
  44. package/src/hooks/auth/useOnError/index.ts +7 -0
  45. package/src/hooks/auth/usePermissions/index.ts +13 -2
  46. package/src/hooks/auth/useRegister/index.ts +13 -0
  47. package/src/hooks/auth/useUpdatePassword/index.ts +13 -0
  48. package/src/hooks/data/useCreate.ts +5 -0
  49. package/src/hooks/data/useCreateMany.ts +5 -0
  50. package/src/hooks/data/useCustom.ts +5 -0
  51. package/src/hooks/data/useCustomMutation.ts +5 -0
  52. package/src/hooks/data/useDelete.ts +5 -0
  53. package/src/hooks/data/useDeleteMany.ts +5 -0
  54. package/src/hooks/data/useInfiniteList.ts +6 -0
  55. package/src/hooks/data/useList.ts +6 -0
  56. package/src/hooks/data/useMany.ts +5 -0
  57. package/src/hooks/data/useOne.ts +5 -0
  58. package/src/hooks/data/useUpdate.ts +5 -0
  59. package/src/hooks/data/useUpdateMany.ts +5 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@refinedev/core",
3
- "version": "4.40.0",
3
+ "version": "4.41.0",
4
4
  "description": "refine is a React-based framework for building internal tools, rapidly. It ships with Ant Design System, an enterprise-level UI toolkit.",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -43,6 +43,7 @@
43
43
  "typescript": "^4.7.4"
44
44
  },
45
45
  "dependencies": {
46
+ "@refinedev/devtools-internal": "^1.0.0",
46
47
  "export-to-csv-fix-source-map": "^0.2.1",
47
48
  "lodash-es": "^4.17.21",
48
49
  "lodash": "^4.17.21",
@@ -1,5 +1,6 @@
1
- import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
2
1
  import React from "react";
2
+ import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
3
+ import { useQuerySubscription } from "@refinedev/devtools-internal";
3
4
 
4
5
  import { ReadyPage as DefaultReadyPage, RouteChangeHandler } from "@components";
5
6
  import { Telemetry } from "@components/telemetry";
@@ -237,6 +238,8 @@ export const Refine: React.FC<RefineProps> = ({
237
238
  });
238
239
  }, [reactQueryWithDefaults.clientConfig]);
239
240
 
241
+ useQuerySubscription(queryClient);
242
+
240
243
  const useNotificationProviderValues = React.useMemo(() => {
241
244
  return typeof notificationProvider === "function"
242
245
  ? notificationProvider
@@ -9,6 +9,7 @@ import { AccessControlContext } from "@contexts/accessControl";
9
9
  import { sanitizeResource } from "@definitions/helpers/sanitize-resource";
10
10
  import { CanParams, CanReturnType } from "../../../interfaces";
11
11
  import { useKeys } from "@hooks/useKeys";
12
+ import { getXRay } from "@refinedev/devtools-internal";
12
13
 
13
14
  export type UseCanProps = CanParams & {
14
15
  /**
@@ -64,6 +65,10 @@ export const useCan = ({
64
65
  {
65
66
  enabled: typeof can !== "undefined",
66
67
  ...queryOptions,
68
+ meta: {
69
+ ...queryOptions?.meta,
70
+ ...getXRay("useCan", preferLegacyKeys),
71
+ },
67
72
  retry: false,
68
73
  },
69
74
  );
@@ -14,6 +14,7 @@ import { hasPermission, pickNotDeprecated } from "@definitions/helpers";
14
14
  import { pickResource } from "@definitions/helpers/pick-resource";
15
15
  import { useActiveAuthProvider } from "@definitions/helpers";
16
16
  import { useKeys } from "@hooks/useKeys";
17
+ import { getXRay } from "@refinedev/devtools-internal";
17
18
 
18
19
  type LogRenameData =
19
20
  | {
@@ -113,6 +114,10 @@ export const useLog = <
113
114
  {
114
115
  mutationKey: keys().audit().action("log").get(),
115
116
  ...logMutationOptions,
117
+ meta: {
118
+ ...logMutationOptions?.meta,
119
+ ...getXRay("useLog", preferLegacyKeys),
120
+ },
116
121
  },
117
122
  );
118
123
 
@@ -139,6 +144,10 @@ export const useLog = <
139
144
  },
140
145
  mutationKey: keys().audit().action("rename").get(),
141
146
  ...renameMutationOptions,
147
+ meta: {
148
+ ...renameMutationOptions?.meta,
149
+ ...getXRay("useLog", preferLegacyKeys),
150
+ },
142
151
  },
143
152
  );
144
153
 
@@ -8,6 +8,7 @@ import {
8
8
  import { AuditLogContext } from "@contexts/auditLog";
9
9
  import { HttpError, MetaQuery } from "../../../interfaces";
10
10
  import { useKeys } from "@hooks/useKeys";
11
+ import { getXRay } from "@refinedev/devtools-internal";
11
12
 
12
13
  export type UseLogProps<TQueryFnData, TError, TData> = {
13
14
  resource: string;
@@ -62,6 +63,10 @@ export const useLogList = <
62
63
  enabled: typeof get !== "undefined",
63
64
  ...queryOptions,
64
65
  retry: false,
66
+ meta: {
67
+ ...queryOptions?.meta,
68
+ ...getXRay("useLogList", preferLegacyKeys),
69
+ },
65
70
  },
66
71
  );
67
72
 
@@ -3,6 +3,7 @@ import {
3
3
  UseMutationOptions,
4
4
  UseMutationResult,
5
5
  } from "@tanstack/react-query";
6
+ import { getXRay } from "@refinedev/devtools-internal";
6
7
 
7
8
  import { useGo, useNavigation, useNotification, useRouterType } from "@hooks";
8
9
  import { useAuthBindingsContext, useLegacyAuthContext } from "@contexts/auth";
@@ -145,6 +146,12 @@ export function useForgotPassword<TVariables = {}>({
145
146
  open?.(buildNotification(error));
146
147
  },
147
148
  ...(v3LegacyAuthProviderCompatible === true ? {} : mutationOptions),
149
+ meta: {
150
+ ...(v3LegacyAuthProviderCompatible === true
151
+ ? {}
152
+ : mutationOptions?.meta),
153
+ ...getXRay("useForgotPassword", preferLegacyKeys),
154
+ },
148
155
  },
149
156
  );
150
157
 
@@ -176,6 +183,12 @@ export function useForgotPassword<TVariables = {}>({
176
183
  open?.(buildNotification(error));
177
184
  },
178
185
  ...(v3LegacyAuthProviderCompatible ? mutationOptions : {}),
186
+ meta: {
187
+ ...(v3LegacyAuthProviderCompatible
188
+ ? mutationOptions?.meta
189
+ : {}),
190
+ ...getXRay("useForgotPassword", preferLegacyKeys),
191
+ },
179
192
  },
180
193
  );
181
194
 
@@ -3,6 +3,7 @@ import {
3
3
  UseQueryResult,
4
4
  UseQueryOptions,
5
5
  } from "@tanstack/react-query";
6
+ import { getXRay } from "@refinedev/devtools-internal";
6
7
 
7
8
  import { useAuthBindingsContext, useLegacyAuthContext } from "@contexts/auth";
8
9
  import { IdentityResponse } from "../../../interfaces";
@@ -76,6 +77,12 @@ export function useGetIdentity<TData = any>({
76
77
  enabled: !v3LegacyAuthProviderCompatible && !!getIdentity,
77
78
  retry: false,
78
79
  ...(v3LegacyAuthProviderCompatible === true ? {} : queryOptions),
80
+ meta: {
81
+ ...(v3LegacyAuthProviderCompatible === true
82
+ ? {}
83
+ : queryOptions?.meta),
84
+ ...getXRay("useGetIdentity", preferLegacyKeys),
85
+ },
79
86
  },
80
87
  );
81
88
 
@@ -90,6 +97,10 @@ export function useGetIdentity<TData = any>({
90
97
  enabled: v3LegacyAuthProviderCompatible && !!legacyGetUserIdentity,
91
98
  retry: false,
92
99
  ...(v3LegacyAuthProviderCompatible ? queryOptions : {}),
100
+ meta: {
101
+ ...(v3LegacyAuthProviderCompatible ? queryOptions?.meta : {}),
102
+ ...getXRay("useGetIdentity", preferLegacyKeys),
103
+ },
93
104
  },
94
105
  );
95
106
 
@@ -1,4 +1,5 @@
1
1
  import { useQuery, UseQueryResult } from "@tanstack/react-query";
2
+ import { getXRay } from "@refinedev/devtools-internal";
2
3
 
3
4
  import { useAuthBindingsContext, useLegacyAuthContext } from "@contexts/auth";
4
5
  import { CheckResponse } from "../../../interfaces";
@@ -61,6 +62,9 @@ export function useIsAuthenticated({
61
62
  {
62
63
  retry: false,
63
64
  enabled: !v3LegacyAuthProviderCompatible,
65
+ meta: {
66
+ ...getXRay("useIsAuthenticated", preferLegacyKeys),
67
+ },
64
68
  },
65
69
  );
66
70
 
@@ -77,6 +81,9 @@ export function useIsAuthenticated({
77
81
  {
78
82
  retry: false,
79
83
  enabled: v3LegacyAuthProviderCompatible,
84
+ meta: {
85
+ ...getXRay("useIsAuthenticated", preferLegacyKeys),
86
+ },
80
87
  },
81
88
  );
82
89
 
@@ -4,6 +4,7 @@ import {
4
4
  UseMutationOptions,
5
5
  UseMutationResult,
6
6
  } from "@tanstack/react-query";
7
+ import { getXRay } from "@refinedev/devtools-internal";
7
8
  import qs from "qs";
8
9
 
9
10
  import {
@@ -178,6 +179,12 @@ export function useLogin<TVariables = {}>({
178
179
  open?.(buildNotification(error));
179
180
  },
180
181
  ...(v3LegacyAuthProviderCompatible === true ? {} : mutationOptions),
182
+ meta: {
183
+ ...(v3LegacyAuthProviderCompatible === true
184
+ ? {}
185
+ : mutationOptions?.meta),
186
+ ...getXRay("useLogin", preferLegacyKeys),
187
+ },
181
188
  });
182
189
 
183
190
  const v3LegacyAuthProviderCompatibleMutation = useMutation<
@@ -221,6 +228,12 @@ export function useLogin<TVariables = {}>({
221
228
  open?.(buildNotification(error));
222
229
  },
223
230
  ...(v3LegacyAuthProviderCompatible ? mutationOptions : {}),
231
+ meta: {
232
+ ...(v3LegacyAuthProviderCompatible
233
+ ? mutationOptions?.meta
234
+ : {}),
235
+ ...getXRay("useLogin", preferLegacyKeys),
236
+ },
224
237
  },
225
238
  );
226
239
 
@@ -3,6 +3,7 @@ import {
3
3
  UseMutationOptions,
4
4
  UseMutationResult,
5
5
  } from "@tanstack/react-query";
6
+ import { getXRay } from "@refinedev/devtools-internal";
6
7
 
7
8
  import { useGo, useNavigation, useNotification, useRouterType } from "@hooks";
8
9
  import { useAuthBindingsContext, useLegacyAuthContext } from "@contexts/auth";
@@ -148,6 +149,12 @@ export function useLogout<TVariables = {}>({
148
149
  open?.(buildNotification(error));
149
150
  },
150
151
  ...(v3LegacyAuthProviderCompatible === true ? {} : mutationOptions),
152
+ meta: {
153
+ ...(v3LegacyAuthProviderCompatible === true
154
+ ? {}
155
+ : mutationOptions?.meta),
156
+ ...getXRay("useLogout", preferLegacyKeys),
157
+ },
151
158
  });
152
159
 
153
160
  const v3LegacyAuthProviderCompatibleMutation = useMutation<
@@ -190,6 +197,12 @@ export function useLogout<TVariables = {}>({
190
197
  open?.(buildNotification(error));
191
198
  },
192
199
  ...(v3LegacyAuthProviderCompatible ? mutationOptions : {}),
200
+ meta: {
201
+ ...(v3LegacyAuthProviderCompatible
202
+ ? mutationOptions?.meta
203
+ : {}),
204
+ ...getXRay("useLogout", preferLegacyKeys),
205
+ },
193
206
  },
194
207
  );
195
208
 
@@ -1,4 +1,5 @@
1
1
  import { useMutation, UseMutationResult } from "@tanstack/react-query";
2
+ import { getXRay } from "@refinedev/devtools-internal";
2
3
 
3
4
  import { useAuthBindingsContext, useLegacyAuthContext } from "@contexts/auth";
4
5
  import { OnErrorResponse } from "../../../interfaces";
@@ -93,6 +94,9 @@ export function useOnError({
93
94
  return;
94
95
  }
95
96
  },
97
+ meta: {
98
+ ...getXRay("useOnError", preferLegacyKeys),
99
+ },
96
100
  },
97
101
  );
98
102
 
@@ -106,6 +110,9 @@ export function useOnError({
106
110
  onError: (redirectPath?: string) => {
107
111
  legacyLogout({ redirectPath });
108
112
  },
113
+ meta: {
114
+ ...getXRay("useOnError", preferLegacyKeys),
115
+ },
109
116
  },
110
117
  );
111
118
 
@@ -1,12 +1,15 @@
1
- import { useAuthBindingsContext, useLegacyAuthContext } from "@contexts/auth";
2
- import { PermissionResponse } from "../../../interfaces";
3
1
  import {
4
2
  useQuery,
5
3
  UseQueryResult,
6
4
  UseQueryOptions,
7
5
  } from "@tanstack/react-query";
6
+ import { getXRay } from "@refinedev/devtools-internal";
7
+
8
8
  import { useKeys } from "@hooks/useKeys";
9
9
 
10
+ import { useAuthBindingsContext, useLegacyAuthContext } from "@contexts/auth";
11
+ import { PermissionResponse } from "../../../interfaces";
12
+
10
13
  export type UsePermissionsLegacyProps<TData = any> = {
11
14
  v3LegacyAuthProviderCompatible: true;
12
15
  options?: UseQueryOptions<TData>;
@@ -72,6 +75,10 @@ export function usePermissions<TData = any>({
72
75
  {
73
76
  enabled: !v3LegacyAuthProviderCompatible && !!getPermissions,
74
77
  ...(v3LegacyAuthProviderCompatible ? {} : options),
78
+ meta: {
79
+ ...(v3LegacyAuthProviderCompatible ? {} : options?.meta),
80
+ ...getXRay("usePermissions", preferLegacyKeys),
81
+ },
75
82
  },
76
83
  );
77
84
 
@@ -85,6 +92,10 @@ export function usePermissions<TData = any>({
85
92
  {
86
93
  enabled: v3LegacyAuthProviderCompatible && !!legacyGetPermission,
87
94
  ...(v3LegacyAuthProviderCompatible ? options : {}),
95
+ meta: {
96
+ ...(v3LegacyAuthProviderCompatible ? options?.meta : {}),
97
+ ...getXRay("usePermissions", preferLegacyKeys),
98
+ },
88
99
  },
89
100
  );
90
101
 
@@ -3,6 +3,7 @@ import {
3
3
  UseMutationOptions,
4
4
  UseMutationResult,
5
5
  } from "@tanstack/react-query";
6
+ import { getXRay } from "@refinedev/devtools-internal";
6
7
 
7
8
  import { useNavigation, useRouterType, useGo, useNotification } from "@hooks";
8
9
  import { useAuthBindingsContext, useLegacyAuthContext } from "@contexts/auth";
@@ -150,6 +151,12 @@ export function useRegister<TVariables = {}>({
150
151
  open?.(buildNotification(error));
151
152
  },
152
153
  ...(v3LegacyAuthProviderCompatible === true ? {} : mutationOptions),
154
+ meta: {
155
+ ...(v3LegacyAuthProviderCompatible === true
156
+ ? {}
157
+ : mutationOptions?.meta),
158
+ ...getXRay("useRegister", preferLegacyKeys),
159
+ },
153
160
  },
154
161
  );
155
162
 
@@ -189,6 +196,12 @@ export function useRegister<TVariables = {}>({
189
196
  open?.(buildNotification(error));
190
197
  },
191
198
  ...(v3LegacyAuthProviderCompatible ? mutationOptions : {}),
199
+ meta: {
200
+ ...(v3LegacyAuthProviderCompatible
201
+ ? mutationOptions?.meta
202
+ : {}),
203
+ ...getXRay("useRegister", preferLegacyKeys),
204
+ },
192
205
  },
193
206
  );
194
207
 
@@ -4,6 +4,7 @@ import {
4
4
  UseMutationOptions,
5
5
  UseMutationResult,
6
6
  } from "@tanstack/react-query";
7
+ import { getXRay } from "@refinedev/devtools-internal";
7
8
  import qs from "qs";
8
9
 
9
10
  import {
@@ -188,6 +189,12 @@ export function useUpdatePassword<
188
189
  open?.(buildNotification(error));
189
190
  },
190
191
  ...(v3LegacyAuthProviderCompatible === true ? {} : mutationOptions),
192
+ meta: {
193
+ ...(v3LegacyAuthProviderCompatible === true
194
+ ? {}
195
+ : mutationOptions?.meta),
196
+ ...getXRay("useUpdatePassword", preferLegacyKeys),
197
+ },
191
198
  },
192
199
  );
193
200
 
@@ -224,6 +231,12 @@ export function useUpdatePassword<
224
231
  open?.(buildNotification(error));
225
232
  },
226
233
  ...(v3LegacyAuthProviderCompatible ? mutationOptions : {}),
234
+ meta: {
235
+ ...(v3LegacyAuthProviderCompatible
236
+ ? mutationOptions?.meta
237
+ : {}),
238
+ ...getXRay("useUpdatePassword", preferLegacyKeys),
239
+ },
227
240
  },
228
241
  );
229
242
 
@@ -3,6 +3,7 @@ import {
3
3
  UseMutationOptions,
4
4
  UseMutationResult,
5
5
  } from "@tanstack/react-query";
6
+ import { getXRay } from "@refinedev/devtools-internal";
6
7
  import {
7
8
  pickDataProvider,
8
9
  pickNotDeprecated,
@@ -281,6 +282,10 @@ export const useCreate = <
281
282
  },
282
283
  mutationKey: keys().data().mutation("create").get(preferLegacyKeys),
283
284
  ...mutationOptions,
285
+ meta: {
286
+ ...mutationOptions?.meta,
287
+ ...getXRay("useCreate", preferLegacyKeys),
288
+ },
284
289
  },
285
290
  );
286
291
 
@@ -3,6 +3,7 @@ import {
3
3
  UseMutationOptions,
4
4
  UseMutationResult,
5
5
  } from "@tanstack/react-query";
6
+ import { getXRay } from "@refinedev/devtools-internal";
6
7
 
7
8
  import {
8
9
  BaseRecord,
@@ -268,6 +269,10 @@ export const useCreateMany = <
268
269
  .mutation("createMany")
269
270
  .get(preferLegacyKeys),
270
271
  ...mutationOptions,
272
+ meta: {
273
+ ...mutationOptions?.meta,
274
+ ...getXRay("useCreateMany", preferLegacyKeys),
275
+ },
271
276
  },
272
277
  );
273
278
 
@@ -3,6 +3,7 @@ import {
3
3
  useQuery,
4
4
  UseQueryOptions,
5
5
  } from "@tanstack/react-query";
6
+ import { getXRay } from "@refinedev/devtools-internal";
6
7
 
7
8
  import { pickNotDeprecated, useActiveAuthProvider } from "@definitions/helpers";
8
9
  import {
@@ -213,6 +214,10 @@ export const useCustom = <
213
214
  type: "error",
214
215
  });
215
216
  },
217
+ meta: {
218
+ ...queryOptions?.meta,
219
+ ...getXRay("useCustom", preferLegacyKeys),
220
+ },
216
221
  });
217
222
  const { elapsedTime } = useLoadingOvertime({
218
223
  isLoading: queryResponse.isFetching,
@@ -3,6 +3,7 @@ import {
3
3
  UseMutationOptions,
4
4
  UseMutationResult,
5
5
  } from "@tanstack/react-query";
6
+ import { getXRay } from "@refinedev/devtools-internal";
6
7
 
7
8
  import {
8
9
  useDataProvider,
@@ -205,6 +206,10 @@ export const useCustomMutation = <
205
206
  .mutation("customMutation")
206
207
  .get(preferLegacyKeys),
207
208
  ...mutationOptions,
209
+ meta: {
210
+ ...mutationOptions?.meta,
211
+ ...getXRay("useCustomMutation", preferLegacyKeys),
212
+ },
208
213
  },
209
214
  );
210
215
 
@@ -4,6 +4,7 @@ import {
4
4
  UseMutationResult,
5
5
  UseMutationOptions,
6
6
  } from "@tanstack/react-query";
7
+ import { getXRay } from "@refinedev/devtools-internal";
7
8
 
8
9
  import {
9
10
  useResource,
@@ -493,6 +494,10 @@ export const useDelete = <
493
494
  },
494
495
  mutationKey: keys().data().mutation("delete").get(preferLegacyKeys),
495
496
  ...mutationOptions,
497
+ meta: {
498
+ ...mutationOptions?.meta,
499
+ ...getXRay("useDelete", preferLegacyKeys),
500
+ },
496
501
  },
497
502
  );
498
503
 
@@ -4,6 +4,7 @@ import {
4
4
  UseMutationResult,
5
5
  UseMutationOptions,
6
6
  } from "@tanstack/react-query";
7
+ import { getXRay } from "@refinedev/devtools-internal";
7
8
 
8
9
  import {
9
10
  DeleteManyResponse,
@@ -528,6 +529,10 @@ export const useDeleteMany = <
528
529
  .mutation("deleteMany")
529
530
  .get(preferLegacyKeys),
530
531
  ...mutationOptions,
532
+ meta: {
533
+ ...mutationOptions?.meta,
534
+ ...getXRay("useDeleteMany", preferLegacyKeys),
535
+ },
531
536
  },
532
537
  );
533
538
 
@@ -4,6 +4,8 @@ import {
4
4
  InfiniteQueryObserverResult,
5
5
  InfiniteData,
6
6
  } from "@tanstack/react-query";
7
+ import { getXRay } from "@refinedev/devtools-internal";
8
+
7
9
  import {
8
10
  CrudFilters,
9
11
  Pagination,
@@ -320,6 +322,10 @@ export const useInfiniteList = <
320
322
  type: "error",
321
323
  });
322
324
  },
325
+ meta: {
326
+ ...queryOptions?.meta,
327
+ ...getXRay("useInfiniteList", preferLegacyKeys),
328
+ },
323
329
  },
324
330
  );
325
331
 
@@ -3,6 +3,8 @@ import {
3
3
  useQuery,
4
4
  UseQueryOptions,
5
5
  } from "@tanstack/react-query";
6
+ import { getXRay } from "@refinedev/devtools-internal";
7
+
6
8
  import {
7
9
  GetListResponse,
8
10
  CrudFilters,
@@ -329,6 +331,10 @@ export const useList = <
329
331
  type: "error",
330
332
  });
331
333
  },
334
+ meta: {
335
+ ...queryOptions?.meta,
336
+ ...getXRay("useList", preferLegacyKeys),
337
+ },
332
338
  },
333
339
  );
334
340
 
@@ -3,6 +3,7 @@ import {
3
3
  useQuery,
4
4
  UseQueryOptions,
5
5
  } from "@tanstack/react-query";
6
+ import { getXRay } from "@refinedev/devtools-internal";
6
7
 
7
8
  import {
8
9
  BaseRecord,
@@ -241,6 +242,10 @@ export const useMany = <
241
242
  type: "error",
242
243
  });
243
244
  },
245
+ meta: {
246
+ ...queryOptions?.meta,
247
+ ...getXRay("useMany", preferLegacyKeys),
248
+ },
244
249
  },
245
250
  );
246
251
 
@@ -3,6 +3,7 @@ import {
3
3
  useQuery,
4
4
  UseQueryOptions,
5
5
  } from "@tanstack/react-query";
6
+ import { getXRay } from "@refinedev/devtools-internal";
6
7
 
7
8
  import {
8
9
  GetOneResponse,
@@ -239,6 +240,10 @@ export const useOne = <
239
240
  type: "error",
240
241
  });
241
242
  },
243
+ meta: {
244
+ ...queryOptions?.meta,
245
+ ...getXRay("useOne", preferLegacyKeys),
246
+ },
242
247
  },
243
248
  );
244
249
 
@@ -4,6 +4,7 @@ import {
4
4
  UseMutationResult,
5
5
  useQueryClient,
6
6
  } from "@tanstack/react-query";
7
+ import { getXRay } from "@refinedev/devtools-internal";
7
8
 
8
9
  import { ActionTypes } from "@contexts/undoableQueue";
9
10
  import {
@@ -602,6 +603,10 @@ export const useUpdate = <
602
603
  },
603
604
  mutationKey: keys().data().mutation("update").get(preferLegacyKeys),
604
605
  ...mutationOptions,
606
+ meta: {
607
+ ...mutationOptions?.meta,
608
+ ...getXRay("useUpdate", preferLegacyKeys),
609
+ },
605
610
  },
606
611
  );
607
612
 
@@ -4,6 +4,7 @@ import {
4
4
  UseMutationResult,
5
5
  useQueryClient,
6
6
  } from "@tanstack/react-query";
7
+ import { getXRay } from "@refinedev/devtools-internal";
7
8
 
8
9
  import {
9
10
  useResource,
@@ -642,6 +643,10 @@ export const useUpdateMany = <
642
643
  .mutation("updateMany")
643
644
  .get(preferLegacyKeys),
644
645
  ...mutationOptions,
646
+ meta: {
647
+ ...mutationOptions?.meta,
648
+ ...getXRay("useUpdateMany", preferLegacyKeys),
649
+ },
645
650
  },
646
651
  );
647
652