@refinedev/core 4.46.0 → 4.46.1

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.
@@ -0,0 +1,6 @@
1
+ import type { DocumentNode } from "graphql";
2
+ export declare type GraphQLQueryOptions = {
3
+ gqlQuery?: DocumentNode;
4
+ gqlMutation?: DocumentNode;
5
+ };
6
+ //# sourceMappingURL=graphqlQueryOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graphqlQueryOptions.d.ts","sourceRoot":"","sources":["../../../src/interfaces/metaData/graphqlQueryOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,oBAAY,mBAAmB,GAAG;IAC9B,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,WAAW,CAAC,EAAE,YAAY,CAAC;CAC9B,CAAC"}
@@ -1,7 +1,8 @@
1
1
  import { QueryFunctionContext } from "@tanstack/react-query";
2
2
  import { QueryBuilderOptions } from "./queryBuilderOptions";
3
+ import { GraphQLQueryOptions } from "./graphqlQueryOptions";
3
4
  export declare type MetaQuery = {
4
5
  [k: string]: any;
5
6
  queryContext?: Omit<QueryFunctionContext, "meta">;
6
- } & QueryBuilderOptions;
7
+ } & QueryBuilderOptions & GraphQLQueryOptions;
7
8
  //# sourceMappingURL=metaQuery.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"metaQuery.d.ts","sourceRoot":"","sources":["../../../src/interfaces/metaData/metaQuery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,oBAAY,SAAS,GAAG;IACpB,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;IACjB,YAAY,CAAC,EAAE,IAAI,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAC;CACrD,GAAG,mBAAmB,CAAC"}
1
+ {"version":3,"file":"metaQuery.d.ts","sourceRoot":"","sources":["../../../src/interfaces/metaData/metaQuery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,oBAAY,SAAS,GAAG;IACpB,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;IACjB,YAAY,CAAC,EAAE,IAAI,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAC;CACrD,GAAG,mBAAmB,GACnB,mBAAmB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@refinedev/core",
3
- "version": "4.46.0",
3
+ "version": "4.46.1",
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,
@@ -35,6 +35,7 @@
35
35
  "@types/react-dom": "^18.0.0",
36
36
  "@types/react-router-dom": "^5.1.8",
37
37
  "@types/testing-library__jest-dom": "^5.14.3",
38
+ "graphql": "^15.6.1",
38
39
  "identity-obj-proxy": "^3.0.0",
39
40
  "jest": "^29.3.1",
40
41
  "jest-environment-jsdom": "^29.3.1",
@@ -266,7 +266,11 @@ export const useDelete = <
266
266
  }) => {
267
267
  const { identifier } = select(resourceName);
268
268
 
269
- const preferredMeta = pickNotDeprecated(meta, metaData);
269
+ const {
270
+ gqlMutation: _,
271
+ gqlQuery: __,
272
+ ...preferredMeta
273
+ } = pickNotDeprecated(meta, metaData) ?? {};
270
274
 
271
275
  const queryKey = queryKeysReplacement(preferLegacyKeys)(
272
276
  identifier,
@@ -272,7 +272,11 @@ export const useDeleteMany = <
272
272
  }) => {
273
273
  const { identifier } = select(resourceName);
274
274
 
275
- const preferredMeta = pickNotDeprecated(meta, metaData);
275
+ const {
276
+ gqlMutation: _,
277
+ gqlQuery: __,
278
+ ...preferredMeta
279
+ } = pickNotDeprecated(meta, metaData) ?? {};
276
280
 
277
281
  const queryKey = queryKeysReplacement(preferLegacyKeys)(
278
282
  identifier,
@@ -282,7 +282,11 @@ export const useUpdate = <
282
282
  }) => {
283
283
  const { identifier } = select(resourceName);
284
284
 
285
- const preferredMeta = pickNotDeprecated(meta, metaData);
285
+ const {
286
+ gqlMutation: _,
287
+ gqlQuery: __,
288
+ ...preferredMeta
289
+ } = pickNotDeprecated(meta, metaData) ?? {};
286
290
 
287
291
  const queryKey = queryKeysReplacement(preferLegacyKeys)(
288
292
  identifier,
@@ -290,12 +290,17 @@ export const useUpdateMany = <
290
290
  optimisticUpdateMap = { list: true, many: true, detail: true },
291
291
  }) => {
292
292
  const { identifier } = select(resourceName);
293
- const preferredMeta = pickNotDeprecated(meta, metaData);
293
+
294
+ const {
295
+ gqlMutation: _,
296
+ gqlQuery: __,
297
+ ...preferredMeta
298
+ } = pickNotDeprecated(meta, metaData) ?? {};
294
299
 
295
300
  const queryKey = queryKeysReplacement(preferLegacyKeys)(
296
301
  identifier,
297
302
  pickDataProvider(identifier, dataProviderName, resources),
298
- pickNotDeprecated(meta, metaData),
303
+ preferredMeta,
299
304
  );
300
305
 
301
306
  const resourceKeys = keys()
@@ -0,0 +1,6 @@
1
+ import type { DocumentNode } from "graphql";
2
+
3
+ export type GraphQLQueryOptions = {
4
+ gqlQuery?: DocumentNode;
5
+ gqlMutation?: DocumentNode;
6
+ };
@@ -1,7 +1,9 @@
1
1
  import { QueryFunctionContext } from "@tanstack/react-query";
2
2
  import { QueryBuilderOptions } from "./queryBuilderOptions";
3
+ import { GraphQLQueryOptions } from "./graphqlQueryOptions";
3
4
 
4
5
  export type MetaQuery = {
5
6
  [k: string]: any;
6
7
  queryContext?: Omit<QueryFunctionContext, "meta">;
7
- } & QueryBuilderOptions;
8
+ } & QueryBuilderOptions &
9
+ GraphQLQueryOptions;