diff --git a/.changeset/afraid-baboons-roll.md b/.changeset/afraid-baboons-roll.md
new file mode 100644
index 000000000000..f473cb421833
--- /dev/null
+++ b/.changeset/afraid-baboons-roll.md
@@ -0,0 +1,18 @@
+---
+"@refinedev/mui": minor
+---
+
+feat: [`useAutocomplete`](https://refine.dev/docs/ui-integrations/material-ui/hooks/use-auto-complete/)'s `queryResult` and `defaultValueQueryResult` is deprecated, use `query` and `defaultValueQuery` instead. #6179
+
+```diff
+import { useAutocomplete } from '@refinedev/mui';
+
+- const { queryResult, defaultValueQueryResult } = useAutocomplete();
++ const { query, defaultValueQuery } = useAutocomplete();
+```
+
+> ✨ You can use `@refinedev/codemod` to automatically migrate your codebase. Simply run the following command in your project's root directory:
+>
+> ```bash
+> npx @refinedev/codemod@latest use-select-query-result
+> ```
diff --git a/.changeset/bright-dancers-tie.md b/.changeset/bright-dancers-tie.md
new file mode 100644
index 000000000000..f9bf6260b108
--- /dev/null
+++ b/.changeset/bright-dancers-tie.md
@@ -0,0 +1,10 @@
+---
+"@refinedev/codemod": minor
+---
+
+feat: added `npx @refinedev/codemod@latest use-select-query-result` to automatically refactor `useSelect`'s `queryResult` and `defaultValueQueryResult` to `query` and `defaultValueQuery` #6179
+
+```diff
+- const { queryResult, defaultValueQueryResult } = useSelect(); // or useAutocomplete, useCheckboxGroup, useRadioGroup
++ const { query, defaultValueQuery } = useSelect();
+```
diff --git a/.changeset/cool-cougars-shop.md b/.changeset/cool-cougars-shop.md
new file mode 100644
index 000000000000..787b011fd1bb
--- /dev/null
+++ b/.changeset/cool-cougars-shop.md
@@ -0,0 +1,18 @@
+---
+"@refinedev/core": minor
+---
+
+feat: [`useSelect`](https://refine.dev/docs/data/hooks/use-select/)'s `queryResult` and `defaultValueQueryResult` is deprecated, use `query` and `defaultValueQuery` instead. #6179
+
+```diff
+import { useSelect } from '@refinedev/core';
+
+- const { queryResult, defaultValueQueryResult } = useSelect();
++ const { query, defaultValueQuery } = useSelect();
+```
+
+> ✨ You can use `@refinedev/codemod` to automatically migrate your codebase. Simply run the following command in your project's root directory:
+>
+> ```bash
+> npx @refinedev/codemod@latest use-select-query-result
+> ```
diff --git a/.changeset/gentle-vans-tease.md b/.changeset/gentle-vans-tease.md
new file mode 100644
index 000000000000..0f96c696ca32
--- /dev/null
+++ b/.changeset/gentle-vans-tease.md
@@ -0,0 +1,36 @@
+---
+"@refinedev/antd": minor
+---
+
+feat: [`useSelect`](https://refine.dev/docs/ui-integrations/ant-design/hooks/use-select/)'s `queryResult` and `defaultValueQueryResult` is deprecated, use `query` and `defaultValueQuery` instead. #6179
+
+```diff
+import { useSelect } from '@refinedev/antd';
+
+- const { queryResult, defaultValueQueryResult } = useSelect();
++ const { query, defaultValueQuery } = useSelect();
+```
+
+feat: [`useCheckboxGroup`](https://refine.dev/docs/ui-integrations/ant-design/hooks/use-checkbox-group/)'s `queryResult` is deprecated, use `query` instead.
+
+```diff
+import { useCheckboxGroup } from '@refinedev/antd';
+
+- const { queryResult } = useCheckboxGroup();
++ const { query } = useCheckboxGroup();
+```
+
+feat: [`useRadioGroup`](https://refine.dev/docs/ui-integrations/ant-design/hooks/use-radio-group/)'s `queryResult` is deprecated, use `query` instead.
+
+```diff
+import { useRadioGroup } from '@refinedev/antd';
+
+- const { queryResult } = useRadioGroup();
++ const { query } = useRadioGroup();
+```
+
+> ✨ You can use `@refinedev/codemod` to automatically migrate your codebase. Simply run the following command in your project's root directory:
+>
+> ```bash
+> npx @refinedev/codemod@latest use-select-query-result
+> ```
diff --git a/.changeset/perfect-monkeys-burn.md b/.changeset/perfect-monkeys-burn.md
new file mode 100644
index 000000000000..fea9d99bc918
--- /dev/null
+++ b/.changeset/perfect-monkeys-burn.md
@@ -0,0 +1,18 @@
+---
+"@refinedev/mantine": minor
+---
+
+feat: [`useSelect`](https://refine.dev/docs/ui-integrations/mantine/hooks/use-select/)'s `queryResult` and `defaultValueQueryResult` is deprecated, use `query` and `defaultValueQuery` instead. #6179
+
+```diff
+import { useSelect } from '@refinedev/mantine';
+
+- const { queryResult, defaultValueQueryResult } = useSelect();
++ const { query, defaultValueQuery } = useSelect();
+```
+
+> ✨ You can use `@refinedev/codemod` to automatically migrate your codebase. Simply run the following command in your project's root directory:
+>
+> ```bash
+> npx @refinedev/codemod@latest use-select-query-result
+> ```
diff --git a/documentation/docs/data/hooks/use-select/index.md b/documentation/docs/data/hooks/use-select/index.md
index 0f31ae3a2cb2..a6dec752ab53 100644
--- a/documentation/docs/data/hooks/use-select/index.md
+++ b/documentation/docs/data/hooks/use-select/index.md
@@ -462,14 +462,14 @@ useSelect({
### Can I create the options manually?
-Sometimes it may not be enough to create `optionLabel` and `optionValue` options. In this case we create options with `queryResult`.
+Sometimes it may not be enough to create `optionLabel` and `optionValue` options. In this case we create options with `query`.
```tsx
-const { queryResult } = useSelect({
+const { query } = useSelect({
resource: "categories",
});
-const options = queryResult.data?.data.map((item) => ({
+const options = query.data?.data.map((item) => ({
label: item.name,
value: item.id,
}));
@@ -501,13 +501,13 @@ return (
### Return values
-| Property | Description | Type |
-| ----------------------- | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
-| options | It returns possible options | `{ label: string; value: string }` |
-| queryResult | Result of the query of a record | [`QueryObserverResult<{ data: TData; error: TError }>`](https://react-query.tanstack.com/reference/useQuery) |
-| defaultValueQueryResult | Result of the query of a `defaultValue` record | [`QueryObserverResult<{ data: TData; error: TError }>`](https://react-query.tanstack.com/reference/useQuery) |
-| onSearch | A function to set the search value | `onSearch: (value: string) => void` |
-| overtime | Overtime loading props | `{ elapsedTime?: number }` |
+| Property | Description | Type |
+| ----------------- | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
+| options | It returns possible options | `{ label: string; value: string }` |
+| query | Result of the query of a record | [`QueryObserverResult<{ data: TData; error: TError }>`](https://react-query.tanstack.com/reference/useQuery) |
+| defaultValueQuery | Result of the query of a `defaultValue` record | [`QueryObserverResult<{ data: TData; error: TError }>`](https://react-query.tanstack.com/reference/useQuery) |
+| onSearch | A function to set the search value | `onSearch: (value: string) => void` |
+| overtime | Overtime loading props | `{ elapsedTime?: number }` |
## Example
diff --git a/documentation/docs/ui-integrations/ant-design/hooks/use-select/index.md b/documentation/docs/ui-integrations/ant-design/hooks/use-select/index.md
index c7ca3ebb2b50..76d6e4d3463f 100644
--- a/documentation/docs/ui-integrations/ant-design/hooks/use-select/index.md
+++ b/documentation/docs/ui-integrations/ant-design/hooks/use-select/index.md
@@ -471,12 +471,12 @@ useSelect({
### Can I create the options manually?
-Sometimes it may not be enough to create `optionLabel` and `optionValue` options. In this case we create options with `queryResult`.
+Sometimes it may not be enough to create `optionLabel` and `optionValue` options. In this case we create options with `query`.
```tsx
-const { queryResult } = useSelect();
+const { query } = useSelect();
-const options = queryResult.data?.data.map((item) => ({
+const options = query.data?.data.map((item) => ({
label: item.title,
value: item.id,
}));
@@ -507,8 +507,8 @@ return ;
| Property | Description | Type |
| -------------------------- | ---------------------------------------------- | --------------------------------------------------------------------------------------------- |
| selectProps | Ant design Select props | [`Select`](https://ant.design/components/select/#API) |
-| queryResult | Result of the query of a record | [`QueryObserverResult<{ data: TData }>`](https://react-query.tanstack.com/reference/useQuery) |
-| defaultValueQueryResult | Result of the query of a `defaultValue` record | [`QueryObserverResult<{ data: TData }>`](https://react-query.tanstack.com/reference/useQuery) |
+| query | Result of the query of a record | [`QueryObserverResult<{ data: TData }>`](https://react-query.tanstack.com/reference/useQuery) |
+| defaultValueQuery | Result of the query of a `defaultValue` record | [`QueryObserverResult<{ data: TData }>`](https://react-query.tanstack.com/reference/useQuery) |
| defaultValueQueryOnSuccess | Default value onSuccess method | `() => void` |
| overtime | Overtime loading props | `{ elapsedTime?: number }` |
diff --git a/documentation/docs/ui-integrations/mantine/hooks/use-select/index.md b/documentation/docs/ui-integrations/mantine/hooks/use-select/index.md
index edfbeec475fb..0c2cb7dc96cc 100644
--- a/documentation/docs/ui-integrations/mantine/hooks/use-select/index.md
+++ b/documentation/docs/ui-integrations/mantine/hooks/use-select/index.md
@@ -460,12 +460,12 @@ useSelect({
### Can I create the options manually?
-Sometimes it may not be enough to create `optionLabel` and `optionValue` options. In this case we create options with `queryResult`.
+Sometimes it may not be enough to create `optionLabel` and `optionValue` options. In this case we create options with `query`.
```tsx
-const { queryResult } = useSelect();
+const { query } = useSelect();
-const options = queryResult.data?.data.map((item) => ({
+const options = query.data?.data.map((item) => ({
label: item.title,
value: item.id,
}));
@@ -496,8 +496,8 @@ return ;
| Property | Description | Type |
| -------------------------- | ---------------------------------------------- | --------------------------------------------------------------------------------------------- |
| selectProps | Mantine Select props | [`SelectPropsType`](#selectpropstype) |
-| queryResult | Result of the query of a record | [`QueryObserverResult<{ data: TData }>`](https://react-query.tanstack.com/reference/useQuery) |
-| defaultValueQueryResult | Result of the query of a `defaultValue` record | [`QueryObserverResult<{ data: TData }>`](https://react-query.tanstack.com/reference/useQuery) |
+| query | Result of the query of a record | [`QueryObserverResult<{ data: TData }>`](https://react-query.tanstack.com/reference/useQuery) |
+| defaultValueQuery | Result of the query of a `defaultValue` record | [`QueryObserverResult<{ data: TData }>`](https://react-query.tanstack.com/reference/useQuery) |
| defaultValueQueryOnSuccess | Default value onSuccess method | `() => void` |
| overtime | Overtime loading props | `{ elapsedTime?: number }` |
diff --git a/documentation/docs/ui-integrations/material-ui/hooks/use-auto-complete/index.md b/documentation/docs/ui-integrations/material-ui/hooks/use-auto-complete/index.md
index bfaee58f1a76..c6b2d181afc7 100644
--- a/documentation/docs/ui-integrations/material-ui/hooks/use-auto-complete/index.md
+++ b/documentation/docs/ui-integrations/material-ui/hooks/use-auto-complete/index.md
@@ -407,12 +407,12 @@ In some cases we only have `id`, it may be necessary to show it selected in the
### Can I create the options manually?
-You can create a new `options` object with `queryResult`.
+You can create a new `options` object with `query`.
```tsx
-const { autocompleteProps, queryResult } = useAutocomplete();
+const { autocompleteProps, query } = useAutocomplete();
-const options = queryResult.data?.data.map((item) => ({
+const options = query.data?.data.map((item) => ({
title: item.title,
value: item.id,
}));
@@ -447,8 +447,8 @@ By default, Refine does the search using the [`useList`](/docs/data/hooks/use-de
| Property | Description | Type |
| -------------------------- | ---------------------------------------------- | --------------------------------------------------------------------------------------------- |
| autocompleteProps | Material UI Autocomplete props | [`AutoCompleteReturnValues`](#autocompletereturnvalues) |
-| queryResult | Result of the query of a record | [`QueryObserverResult<{ data: TData }>`](https://react-query.tanstack.com/reference/useQuery) |
-| defaultValueQueryResult | Result of the query of a `defaultValue` record | [`QueryObserverResult<{ data: TData }>`](https://react-query.tanstack.com/reference/useQuery) |
+| query | Result of the query of a record | [`QueryObserverResult<{ data: TData }>`](https://react-query.tanstack.com/reference/useQuery) |
+| defaultValueQuery | Result of the query of a `defaultValue` record | [`QueryObserverResult<{ data: TData }>`](https://react-query.tanstack.com/reference/useQuery) |
| defaultValueQueryOnSuccess | Default value onSuccess method | `() => void` |
| overtime | Overtime loading props | `{ elapsedTime?: number }` |
diff --git a/examples/app-crm-minimal/src/routes/companies/edit/form.tsx b/examples/app-crm-minimal/src/routes/companies/edit/form.tsx
index 23c9f3c126a4..d70e3b49d048 100644
--- a/examples/app-crm-minimal/src/routes/companies/edit/form.tsx
+++ b/examples/app-crm-minimal/src/routes/companies/edit/form.tsx
@@ -37,17 +37,18 @@ export const CompanyForm = () => {
});
const { avatarUrl, name } = queryResult?.data?.data || {};
- const { selectProps: selectPropsUsers, queryResult: queryResultUsers } =
- useSelect>({
- resource: "users",
- optionLabel: "name",
- pagination: {
- mode: "off",
- },
- meta: {
- gqlQuery: USERS_SELECT_QUERY,
- },
- });
+ const { selectProps: selectPropsUsers, query: queryResultUsers } = useSelect<
+ GetFieldsFromList
+ >({
+ resource: "users",
+ optionLabel: "name",
+ pagination: {
+ mode: "off",
+ },
+ meta: {
+ gqlQuery: USERS_SELECT_QUERY,
+ },
+ });
return (
{
},
});
- const { selectProps, queryResult } = useSelect<
+ const { selectProps, query: queryResult } = useSelect<
GetFieldsFromList
>({
resource: "users",
diff --git a/examples/app-crm/src/routes/scrumboard/sales/create.tsx b/examples/app-crm/src/routes/scrumboard/sales/create.tsx
index 456095d193a6..c7e06bfd6ad6 100644
--- a/examples/app-crm/src/routes/scrumboard/sales/create.tsx
+++ b/examples/app-crm/src/routes/scrumboard/sales/create.tsx
@@ -79,7 +79,7 @@ export const SalesCreatePage: FC = ({ children }) => {
}
}, [searchParams]);
- const { selectProps, queryResult } = useSelect<
+ const { selectProps, query: queryResult } = useSelect<
GetFieldsFromList
>({
resource: "companies",
diff --git a/examples/app-crm/src/routes/scrumboard/sales/edit.tsx b/examples/app-crm/src/routes/scrumboard/sales/edit.tsx
index 26bc644172b0..004d5f2daaf4 100644
--- a/examples/app-crm/src/routes/scrumboard/sales/edit.tsx
+++ b/examples/app-crm/src/routes/scrumboard/sales/edit.tsx
@@ -37,16 +37,14 @@ export const SalesEditPage = () => {
},
});
- const {
- selectProps: companySelectProps,
- queryResult: companySelectQueryResult,
- } = useSelect>({
- resource: "companies",
- optionLabel: "name",
- meta: {
- gqlQuery: SALES_COMPANIES_SELECT_QUERY,
- },
- });
+ const { selectProps: companySelectProps, query: companySelectQueryResult } =
+ useSelect>({
+ resource: "companies",
+ optionLabel: "name",
+ meta: {
+ gqlQuery: SALES_COMPANIES_SELECT_QUERY,
+ },
+ });
const { selectProps: stageSelectProps } = useDealStagesSelect();
diff --git a/examples/customization-offlayout-area/src/components/sider/index.tsx b/examples/customization-offlayout-area/src/components/sider/index.tsx
index 8adb0da4ec1b..6552cf16329f 100644
--- a/examples/customization-offlayout-area/src/components/sider/index.tsx
+++ b/examples/customization-offlayout-area/src/components/sider/index.tsx
@@ -126,7 +126,6 @@ export const FixedSider: React.FC = () => {
>
-