From c48ccbca993b69db9b3d2c341246025c912c1951 Mon Sep 17 00:00:00 2001 From: nitin <142569587+ehconitin@users.noreply.github.com> Date: Thu, 12 Feb 2026 17:08:06 +0530 Subject: [PATCH] Fix widget and front component queries hitting wrong GraphQL endpoint (#17889) --- .../front-components/components/FrontComponentRenderer.tsx | 3 +-- .../graphWidgetBarChart/hooks/useGraphBarChartWidgetData.ts | 4 ---- .../graphWidgetLineChart/hooks/useGraphLineChartWidgetData.ts | 4 ---- .../graphWidgetPieChart/hooks/useGraphPieChartWidgetData.ts | 4 ---- 4 files changed, 1 insertion(+), 14 deletions(-) diff --git a/packages/twenty-front/src/modules/front-components/components/FrontComponentRenderer.tsx b/packages/twenty-front/src/modules/front-components/components/FrontComponentRenderer.tsx index dbd8819349..682fb51ad5 100644 --- a/packages/twenty-front/src/modules/front-components/components/FrontComponentRenderer.tsx +++ b/packages/twenty-front/src/modules/front-components/components/FrontComponentRenderer.tsx @@ -1,5 +1,6 @@ import { REST_API_BASE_URL } from '@/apollo/constant/rest-api-base-url'; import { getTokenPair } from '@/apollo/utils/getTokenPair'; +import { useFrontComponentExecutionContext } from '@/front-components/hooks/useFrontComponentExecutionContext'; import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar'; import { useTheme } from '@emotion/react'; import { t } from '@lingui/core/macro'; @@ -7,8 +8,6 @@ import { useState } from 'react'; import { FrontComponentRenderer as SharedFrontComponentRenderer } from 'twenty-sdk/front-component'; import { isDefined } from 'twenty-shared/utils'; -import { useFrontComponentExecutionContext } from '@/front-components/hooks/useFrontComponentExecutionContext'; - type FrontComponentRendererProps = { frontComponentId: string; }; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/hooks/useGraphBarChartWidgetData.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/hooks/useGraphBarChartWidgetData.ts index 0834c820ce..cc1af49464 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/hooks/useGraphBarChartWidgetData.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/hooks/useGraphBarChartWidgetData.ts @@ -1,4 +1,3 @@ -import { useApolloCoreClient } from '@/object-metadata/hooks/useApolloCoreClient'; import { useObjectMetadataItemById } from '@/object-metadata/hooks/useObjectMetadataItemById'; import { type FieldMetadataItemOption } from '@/object-metadata/types/FieldMetadataItem'; import { BAR_CHART_DATA } from '@/page-layout/widgets/graph/graphql/queries/barChartData'; @@ -57,8 +56,6 @@ export const useGraphBarChartWidgetData = ({ objectId: objectMetadataItemId, }); - const apolloCoreClient = useApolloCoreClient(); - const dataConfiguration = useMemo( () => extractBarChartDataConfiguration(configuration), [configuration], @@ -70,7 +67,6 @@ export const useGraphBarChartWidgetData = ({ loading, error, } = useQuery(BAR_CHART_DATA, { - client: apolloCoreClient, variables: { input: { objectMetadataId: objectMetadataItemId, diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/hooks/useGraphLineChartWidgetData.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/hooks/useGraphLineChartWidgetData.ts index 050e498e09..bcd3306349 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/hooks/useGraphLineChartWidgetData.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/hooks/useGraphLineChartWidgetData.ts @@ -1,4 +1,3 @@ -import { useApolloCoreClient } from '@/object-metadata/hooks/useApolloCoreClient'; import { useObjectMetadataItemById } from '@/object-metadata/hooks/useObjectMetadataItemById'; import { type ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem'; import { LINE_CHART_DATA } from '@/page-layout/widgets/graph/graphql/queries/lineChartData'; @@ -46,8 +45,6 @@ export const useGraphLineChartWidgetData = ({ objectId: objectMetadataItemId, }); - const apolloCoreClient = useApolloCoreClient(); - const dataConfiguration = extractLineChartDataConfiguration(configuration); const { @@ -55,7 +52,6 @@ export const useGraphLineChartWidgetData = ({ loading, error, } = useQuery(LINE_CHART_DATA, { - client: apolloCoreClient, variables: { input: { objectMetadataId: objectMetadataItemId, diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/hooks/useGraphPieChartWidgetData.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/hooks/useGraphPieChartWidgetData.ts index cf21905b30..c6ddf215dd 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/hooks/useGraphPieChartWidgetData.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/hooks/useGraphPieChartWidgetData.ts @@ -1,4 +1,3 @@ -import { useApolloCoreClient } from '@/object-metadata/hooks/useApolloCoreClient'; import { useObjectMetadataItemById } from '@/object-metadata/hooks/useObjectMetadataItemById'; import { type ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem'; import { PIE_CHART_DATA } from '@/page-layout/widgets/graph/graphql/queries/pieChartData'; @@ -42,8 +41,6 @@ export const useGraphPieChartWidgetData = ({ objectId: objectMetadataItemId, }); - const apolloCoreClient = useApolloCoreClient(); - const dataConfiguration = useMemo( () => extractPieChartDataConfiguration(configuration), [configuration], @@ -54,7 +51,6 @@ export const useGraphPieChartWidgetData = ({ loading, error, } = useQuery(PIE_CHART_DATA, { - client: apolloCoreClient, variables: { input: { objectMetadataId: objectMetadataItemId,