@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.
- package/CHANGELOG.md +40 -0
- package/dist/esm/index.js +6 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/hooks/data/useDelete.d.ts.map +1 -1
- package/dist/hooks/data/useDeleteMany.d.ts.map +1 -1
- package/dist/hooks/data/useUpdate.d.ts.map +1 -1
- package/dist/hooks/data/useUpdateMany.d.ts.map +1 -1
- package/dist/hooks/useMeta/index.d.ts +2 -0
- package/dist/hooks/useMeta/index.d.ts.map +1 -1
- package/dist/iife/index.js +6 -6
- package/dist/iife/index.js.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/interfaces/metaData/graphqlQueryOptions.d.ts +6 -0
- package/dist/interfaces/metaData/graphqlQueryOptions.d.ts.map +1 -0
- package/dist/interfaces/metaData/metaQuery.d.ts +2 -1
- package/dist/interfaces/metaData/metaQuery.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/hooks/data/useDelete.ts +5 -1
- package/src/hooks/data/useDeleteMany.ts +5 -1
- package/src/hooks/data/useUpdate.ts +5 -1
- package/src/hooks/data/useUpdateMany.ts +7 -2
- package/src/interfaces/metaData/graphqlQueryOptions.ts +6 -0
- package/src/interfaces/metaData/metaQuery.ts +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,45 @@
|
|
|
1
1
|
# @refinedev/core
|
|
2
2
|
|
|
3
|
+
## 4.46.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#5409](https://github.com/refinedev/refine/pull/5409) [`0026fe34d0`](https://github.com/refinedev/refine/commit/0026fe34d0e46209f42e40834c6942ade22f242f) Thanks [@BatuhanW](https://github.com/BatuhanW)! - fix: exclude `gqlMutation` and `gqlQuery` from building query keys for `useUpdate`, `useUpdateMany`, `useDelete`, and `useDeleteMany` hooks.
|
|
8
|
+
|
|
9
|
+
- [#5409](https://github.com/refinedev/refine/pull/5409) [`0026fe34d0`](https://github.com/refinedev/refine/commit/0026fe34d0e46209f42e40834c6942ade22f242f) Thanks [@BatuhanW](https://github.com/BatuhanW)! - feat: add optional `gqlQuery` and `gqlMutation` fields to `MetaQuery` type to be used in `data hooks`.
|
|
10
|
+
|
|
11
|
+
We plan to utilize these fields on our GraphQL data providers in the future.
|
|
12
|
+
|
|
13
|
+
You can build your queries/mutations with `graphql-tag` package and pass it to the `gqlQuery`/`gqlMutation` fields.
|
|
14
|
+
|
|
15
|
+
For now, only `@refinedev/nestjs-query` package supports it.
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import { useList } from "@refinedev/core";
|
|
19
|
+
import gql from "graphql-tag";
|
|
20
|
+
|
|
21
|
+
const PRODUCTS_QUERY = gql`
|
|
22
|
+
query ProductsList(
|
|
23
|
+
$paging: OffsetPaging!
|
|
24
|
+
$filter: BlogPostFilter
|
|
25
|
+
$sorting: [BlogPostSort!]!
|
|
26
|
+
) {
|
|
27
|
+
products(paging: $paging, filter: $filter, sorting: $sorting) {
|
|
28
|
+
nodes {
|
|
29
|
+
id
|
|
30
|
+
name
|
|
31
|
+
}
|
|
32
|
+
totalCount
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
36
|
+
|
|
37
|
+
const { data } = useList({
|
|
38
|
+
resource: "products",
|
|
39
|
+
meta: { gqlQuery: PRODUCTS_QUERY },
|
|
40
|
+
});
|
|
41
|
+
```
|
|
42
|
+
|
|
3
43
|
## 4.46.0
|
|
4
44
|
|
|
5
45
|
### Minor Changes
|