Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions documentation/docs/audit-logs/hooks/use-log/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ mutate({

### Return value

| Description | Type |
| ----------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Result of the `react-query`'s useMutation | [`UseMutationResult<{ data: TData}, TError, { id: BaseKey; name: string; }, unknown>`](https://tanstack.com/query/v4/docs/framework/react/reference/useMutation) |
| Description | Type |
| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Result of the `react-query`'s useMutation | [`UseMutationResult<{ data: TData}, TError, { id: BaseKey; name: string; }, unknown>`](https://tanstack.com/query/v5/docs/react/reference/useMutation) |

## rename

Expand Down Expand Up @@ -94,6 +94,6 @@ mutate({

### Return value

| Description | Type |
| ----------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Result of the `react-query`'s useMutation | [`UseMutationResult<{ data: TData}, TError, { id: BaseKey; name: string; }, unknown>`](https://tanstack.com/query/v4/docs/framework/react/reference/useMutation) |
| Description | Type |
| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Result of the `react-query`'s useMutation | [`UseMutationResult<{ data: TData}, TError, { id: BaseKey; name: string; }, unknown>`](https://tanstack.com/query/v5/docs/react/reference/useMutation) |
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ source: /packages/core/src/hooks/auth/useForgotPassword/index.ts

`useForgotPassword` calls the `forgotPassword` method from [`authProvider`](/docs/authentication/auth-provider) under the hood.

It returns the result of `react-query`'s [useMutation](https://tanstack.com/query/v4/docs/framework/react/reference/useMutation) which includes many properties, some of which being `isSuccess` and `isError`.
It returns the result of `react-query`'s [useMutation](https://tanstack.com/query/v5/docs/react/reference/useMutation) which includes many properties, some of which being `isSuccess` and `isError`.

Data that is resolved from `forgotPassword` will be returned as the `data` in the query result with the following type:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ source: /packages/core/src/hooks/auth/useLogin/index.ts

`useLogin` calls `login` method from [`authProvider`](/docs/authentication/auth-provider) under the hood.

It returns the result of `react-query`'s [useMutation](https://tanstack.com/query/v4/docs/framework/react/reference/useMutation) which includes many properties, some of which being `isSuccess` and `isError`.
It returns the result of `react-query`'s [useMutation](https://tanstack.com/query/v5/docs/react/reference/useMutation) which includes many properties, some of which being `isSuccess` and `isError`.

Data that is resolved from `login` will be returned as the `data` in the query result with the following type:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ source: /packages/core/src/hooks/auth/useLogout/index.ts

`useLogout` calls the `logout` method from the [`authProvider`](/docs/authentication/auth-provider) under the hood.

It returns the result of `react-query`'s [useMutation](https://tanstack.com/query/v4/docs/framework/react/reference/useMutation) which includes many properties, some of which being `isSuccess` and `isError`.
It returns the result of `react-query`'s [useMutation](https://tanstack.com/query/v5/docs/react/reference/useMutation) which includes many properties, some of which being `isSuccess` and `isError`.

Data that is resolved from `logout` will be returned as the `data` in the query result with the following type:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ source: /packages/core/src/hooks/auth/useOnError/index.ts

`useOnError` calls the [`onError`][on-error] method from the [`authProvider`][auth-provider] under the hood.

It returns the result of `react-query`'s [useMutation](https://tanstack.com/query/v4/docs/react/reference/useMutation), which includes many properties like `isSuccess` and `isError`.
It returns the result of `react-query`'s [useMutation](https://tanstack.com/query/v5/docs/react/reference/useMutation), which includes many properties like `isSuccess` and `isError`.

Data that is resolved from the [`onError`][on-error] will be returned as the `data` in the query result with the following type:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ source: /packages/core/src/hooks/auth/useRegister/index.ts

`useRegister` calls `register` method from [`authProvider`](/docs/authentication/auth-provider) under the hood.

It returns the result of `react-query`'s [useMutation](https://tanstack.com/query/v4/docs/framework/react/reference/useMutation) which includes many properties, some of which being isSuccess and isError.
It returns the result of `react-query`'s [useMutation](https://tanstack.com/query/v5/docs/react/reference/useMutation) which includes many properties, some of which being isSuccess and isError.

Data that is resolved from `register` will be returned as the `data` in the query result with the following type:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ source: /packages/core/src/hooks/auth/useUpdatePassword/index.ts

`useUpdatePassword` calls `updatePassword` method from [`authProvider`](/docs/authentication/auth-provider) under the hood.

It returns the result of `react-query`'s [useMutation](https://tanstack.com/query/v4/docs/framework/react/reference/useMutation).
It returns the result of `react-query`'s [useMutation](https://tanstack.com/query/v5/docs/react/reference/useMutation).

Data that is resolved from `updatePassword` will be returned as the `data` in the query result with the following type:

Expand Down
2 changes: 1 addition & 1 deletion documentation/docs/authorization/hooks/use-can/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,5 +136,5 @@ const MyComponent = () => {
[access-control-provider]: /docs/authorization/access-control-provider
[use-query]: https://tanstack.com/query/latest/docs/react/guides/queries
[tanstack-query]: https://tanstack.com/query/latest
[query-options]: https://tanstack.com/query/v4/docs/react/reference/useQuery
[query-options]: https://tanstack.com/query/v5/docs/react/reference/useQuery
[can-params]: /docs/core/interface-references#canparams
2 changes: 1 addition & 1 deletion documentation/docs/core/interface-references/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ type GraphQLQueryOptions = {

### QueryFunctionContext

Context to be passed to the query function. Refer to [Query Function Context](https://tanstack.com/query/v4/docs/guides/query-functions#queryfunctioncontext) for more information.
Context to be passed to the query function. Refer to [Query Function Context](https://tanstack.com/query/v5/docs/react/guides/query-functions#queryfunctioncontext) for more information.

### QueryBuilderOptions

Expand Down
10 changes: 5 additions & 5 deletions documentation/docs/data/hooks/use-create-many/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: useCreateMany
source: packages/core/src/hooks/data/useCreateMany.ts
---

`useCreateMany` is used for creating multiple records. It is an extended version of TanStack Query's [`useMutation`](https://tanstack.com/query/v4/docs/react/reference/useMutation) and not only supports all features of the mutation but also adds some extra features.
`useCreateMany` is used for creating multiple records. It is an extended version of TanStack Query's [`useMutation`](https://tanstack.com/query/v5/docs/react/reference/useMutation) and not only supports all features of the mutation but also adds some extra features.

It uses the `createMany` method as the **mutation function** from the [`dataProvider`](/docs/data/data-provider) which is passed to `<Refine />`.

Expand Down Expand Up @@ -51,7 +51,7 @@ When the `useCreateMany` mutation runs successfully, it will call the `publish`

When the `useCreateMany` mutation runs successfully, it will invalidate the following queries from the current `resource`: `"list"` and `"many"` by default. Which means that, if you use `useList` or `useMany` hooks in the same page, they will refetch the data after the mutation is completed. You can change this behavior by passing [`invalidates`](#invalidates) prop.

> For more information, refer to the [invalidation documentation &#8594](https://tanstack.com/query/v4/docs/react/guides/query-invalidation)
> For more information, refer to the [invalidation documentation &#8594](https://tanstack.com/query/v5/docs/react/guides/query-invalidation)

## Audit Logs

Expand All @@ -65,7 +65,7 @@ When the `useCreateMany` mutation runs successfully, it will call the `log` meth

`mutationOptions` is used to pass options to the `useMutation` hook. It is useful when you want to pass additional options to the `useMutation` hook.

[Refer to the `useMutation` documentation for more information &#8594](https://tanstack.com/query/v4/docs/react/reference/useMutation)
[Refer to the `useMutation` documentation for more information &#8594](https://tanstack.com/query/v5/docs/react/reference/useMutation)

```tsx
useCreateMany({
Expand Down Expand Up @@ -282,7 +282,7 @@ mutate({

Returns an object with TanStack Query's `useMutation` return values.

> For more information, refer to the [`useMutation` documentation &#8594](https://tanstack.com/query/v4/docs/react/reference/useMutation)
> For more information, refer to the [`useMutation` documentation &#8594](https://tanstack.com/query/v5/docs/react/reference/useMutation)

### Additional Values

Expand Down Expand Up @@ -322,7 +322,7 @@ console.log(overtime.elapsedTime); // undefined, 1000, 2000, 3000 4000, ...

| Property | Description | Type |
| ----------- | ------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| mutation | Result of the TanStack Query's useMutation | [`UseMutationResult<{ data: TData[]}, TError, { resource: string; values: TVariables[]; }, unknown>`](https://tanstack.com/query/v4/docs/react/reference/useMutation) |
| mutation | Result of the TanStack Query's useMutation | [`UseMutationResult<{ data: TData[]}, TError, { resource: string; values: TVariables[]; }, unknown>`](https://tanstack.com/query/v5/docs/react/reference/useMutation) |
| mutate | Mutation function | `(params?: { resource?: string, values?: TVariables[], ... }) => void` |
| mutateAsync | Async mutation function | `(params?: { resource?: string, values?: TVariables[], ... }) => Promise<{ data: TData[] }>` |
| overtime | Overtime loading information | `{ elapsedTime?: number }` |
10 changes: 5 additions & 5 deletions documentation/docs/data/hooks/use-create/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: useCreate
source: packages/core/src/hooks/data/useCreate.ts
---

`useCreate` is used when creating new records. It is an extended version of TanStack Query's [`useMutation`](https://tanstack.com/query/v4/docs/react/reference/useMutation) and not only supports all features of the mutation but also adds some extra features.
`useCreate` is used when creating new records. It is an extended version of TanStack Query's [`useMutation`](https://tanstack.com/query/v5/docs/react/reference/useMutation) and not only supports all features of the mutation but also adds some extra features.

It uses the `create` method as the **mutation function** from the [`dataProvider`](/docs/data/data-provider) which is passed to `<Refine />`.

Expand Down Expand Up @@ -41,7 +41,7 @@ When the `useCreate` mutation runs successfully, it will call the `publish` meth

When the `useCreate` mutation runs successfully, it will invalidate the following queries from the current `resource`: `"list"` and `"many"` by default. Which means that, if you use `useList` or `useMany` hooks on the same page, they will refetch the data after the mutation is completed. You can change this behavior by passing the [`invalidates`](#invalidates) prop.

> For more information, refer to the [query invalidation documentation&#8594](https://tanstack.com/query/v4/docs/react/guides/query-invalidation)
> For more information, refer to the [query invalidation documentation&#8594](https://tanstack.com/query/v5/docs/react/guides/query-invalidation)

## Audit Logs

Expand Down Expand Up @@ -86,7 +86,7 @@ if (mutation.isSuccess) {
}
```

[Refer to the `useMutation` documentation for more information &#8594](https://tanstack.com/query/v4/docs/react/reference/useMutation)
[Refer to the `useMutation` documentation for more information &#8594](https://tanstack.com/query/v5/docs/react/reference/useMutation)

### overtimeOptions

Expand Down Expand Up @@ -295,7 +295,7 @@ mutate({

Returns an object with TanStack Query's `useMutation` return values.

> For more information, refer to the [`useMutation` documentation &#8594](https://tanstack.com/query/v4/docs/react/reference/useMutation)
> For more information, refer to the [`useMutation` documentation &#8594](https://tanstack.com/query/v5/docs/react/reference/useMutation)

### Additional Values

Expand Down Expand Up @@ -338,7 +338,7 @@ console.log(mutation.isLoading); // true/false

| Property | Description | Type |
| ----------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| mutation | Result of the TanStack Query's useMutation | [`UseMutationResult<{ data: TData }, TError, { resource: string; values: TVariables; }, unknown>`](https://tanstack.com/query/v4/docs/react/reference/useMutation) |
| mutation | Result of the TanStack Query's useMutation | [`UseMutationResult<{ data: TData }, TError, { resource: string; values: TVariables; }, unknown>`](https://tanstack.com/query/v5/docs/react/reference/useMutation) |
| mutate | Mutation function | `(params?: { resource?: string, values?: TVariables, ... }) => void` |
| mutateAsync | Async mutation function | `(params?: { resource?: string, values?: TVariables, ... }) => Promise<{ data: TData }>` |
| overtime | Overtime loading information | `{ elapsedTime?: number }` |
8 changes: 4 additions & 4 deletions documentation/docs/data/hooks/use-custom-mutation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: useCustomMutation
source: packages/core/src/hooks/data/useCustomMutation.ts
---

`useCustomMutation` is used when sending custom mutation requests using the TanStack Query advantages. It is an extended version of TanStack Query's [`useMutation`](https://tanstack.com/query/v4/docs/react/reference/useMutation) and not only supports all features of the mutation but also adds some extra features.
`useCustomMutation` is used when sending custom mutation requests using the TanStack Query advantages. It is an extended version of TanStack Query's [`useMutation`](https://tanstack.com/query/v5/docs/react/reference/useMutation) and not only supports all features of the mutation but also adds some extra features.

It uses the `custom` method as the **mutation function** from the [`dataProvider`](/docs/data/data-provider) which is passed to `<Refine>`.

Expand Down Expand Up @@ -53,7 +53,7 @@ console.log(mutation.error); // mutation error

`mutationOptions` is used to pass options to the `useMutation` hook. It is useful when you want to pass additional options to the `useMutation` hook.

> For more information, refer to the [`useMutation` documentation &#8594](https://tanstack.com/query/v4/docs/react/reference/useMutation)
> For more information, refer to the [`useMutation` documentation &#8594](https://tanstack.com/query/v5/docs/react/reference/useMutation)

```tsx
useCustomMutation({
Expand Down Expand Up @@ -268,7 +268,7 @@ console.log(overtime.elapsedTime); // undefined, 1000, 2000, 3000 4000, ...

Returns an object with TanStack Query's `useMutation` return values.

[Refer to the `useMutation` documentation for more information &#8594](https://tanstack.com/query/v4/docs/react/reference/useMutation)
[Refer to the `useMutation` documentation for more information &#8594](https://tanstack.com/query/v5/docs/react/reference/useMutation)

### Additional Values

Expand Down Expand Up @@ -310,7 +310,7 @@ console.log(overtime.elapsedTime); // undefined, 1000, 2000, 3000 4000, ...

| Property | Description | Type |
| ----------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| mutation | Result of the TanStack Query's useMutation | [`UseMutationResult<{ data: TData }, TError, { resource: string; values: TVariables; }, unknown>`](https://tanstack.com/query/v4/docs/react/reference/useMutation) |
| mutation | Result of the TanStack Query's useMutation | [`UseMutationResult<{ data: TData }, TError, { resource: string; values: TVariables; }, unknown>`](https://tanstack.com/query/v5/docs/react/reference/useMutation) |
| mutate | Mutation function | `(params?: { url?: string, method?: string, values?: TVariables, ... }) => void` |
| mutateAsync | Async mutation function | `(params?: { url?: string, method?: string, values?: TVariables, ... }) => Promise<{ data: TData }>` |
| overtime | Overtime loading information | `{ elapsedTime?: number }` |
Loading
Loading