From 1382a4e7b96e70f3da148a7cef13130322771fb8 Mon Sep 17 00:00:00 2001 From: Marco polo Date: Wed, 28 Aug 2024 10:45:24 -0400 Subject: [PATCH] [2/4] Use wrapped useQuery/useLazyQuery (#23861) ## Summary & Motivation Ran `yarn lint --fix` on top of https://github.com/dagster-io/dagster/pull/23860 and this is the output. ## How I Tested These Changes buildkite. ## Changelog [New | Bug | Docs] NOCHANGELOG --- .../packages/ui-core/src/app/AppCache.tsx | 3 +-- .../packages/ui-core/src/app/AppProvider.tsx | 16 ++++++++-------- .../src/app/OperationQueryStringApolloLink.ts | 2 +- .../packages/ui-core/src/app/Permissions.tsx | 2 +- .../ui-core/src/app/PythonErrorFragment.tsx | 2 +- .../packages/ui-core/src/app/PythonErrorInfo.tsx | 2 +- .../packages/ui-core/src/app/QueryRefresh.tsx | 2 +- .../packages/ui-core/src/app/Telemetry.tsx | 2 +- .../packages/ui-core/src/app/apolloLinks.tsx | 3 +-- .../src/asset-data/AssetBaseDataProvider.tsx | 2 +- .../asset-data/AssetStaleStatusDataProvider.tsx | 2 +- .../src/asset-graph/AssetGraphJobSidebar.tsx | 3 +-- .../ui-core/src/asset-graph/AssetNode.tsx | 2 +- .../src/asset-graph/AssetRunLogObserver.tsx | 2 +- .../ui-core/src/asset-graph/SidebarAssetInfo.tsx | 2 +- .../src/asset-graph/useAssetGraphData.tsx | 2 +- .../src/asset-graph/useFindAssetLocation.tsx | 2 +- .../packages/ui-core/src/assets/AssetConfig.tsx | 3 +-- .../assets/AssetDefinedInMultipleReposNotice.tsx | 2 +- .../ui-core/src/assets/AssetGroupRoot.tsx | 2 +- .../ui-core/src/assets/AssetLineageElements.tsx | 2 +- .../assets/AssetMaterializationUpstreamData.tsx | 2 +- .../ui-core/src/assets/AssetMetadata.tsx | 2 +- .../ui-core/src/assets/AssetNodeDefinition.tsx | 2 +- .../src/assets/AssetNodeInstigatorTag.tsx | 2 +- .../ui-core/src/assets/AssetPartitionDetail.tsx | 2 +- .../packages/ui-core/src/assets/AssetTable.tsx | 2 +- .../ui-core/src/assets/AssetTableFragment.tsx | 2 +- .../packages/ui-core/src/assets/AssetView.tsx | 2 +- .../ui-core/src/assets/AssetWipeDialog.oss.tsx | 2 +- .../ui-core/src/assets/AssetsCatalogTable.tsx | 2 +- .../src/assets/AssetsOverviewRoot.oss.tsx | 2 +- .../AutomaterializeMiddlePanel.tsx | 2 +- .../AutomaterializeMiddlePanelWithData.tsx | 2 +- .../AutomaterializeRequestedPartitionsLink.tsx | 2 +- .../AutomaterializeRunTag.tsx | 2 +- .../AutomaterializeRunsTable.tsx | 2 +- .../GetEvaluationsQuery.tsx | 3 +-- .../PartitionSubsetList.tsx | 2 +- .../PartitionSubsetListQuery.tsx | 2 +- .../src/assets/AutoMaterializeSensorFlag.tsx | 3 +-- .../ui-core/src/assets/BackfillPreviewModal.tsx | 2 +- .../src/assets/CalculateUnsyncedDialog.tsx | 2 +- .../src/assets/DeleteDynamicPartitionsDialog.tsx | 2 +- .../assets/LaunchAssetChoosePartitionsDialog.tsx | 2 +- .../src/assets/LaunchAssetExecutionButton.tsx | 2 +- .../src/assets/LaunchAssetObservationButton.tsx | 2 +- .../packages/ui-core/src/assets/OverdueTag.tsx | 2 +- .../src/assets/RunningBackfillsNotice.tsx | 2 +- .../ui-core/src/assets/UnderlyingOpsOrGraph.tsx | 2 +- .../asset-checks/AssetCheckDetailModal.tsx | 2 +- .../src/assets/asset-checks/AssetChecks.tsx | 2 +- .../assets/asset-checks/ExecuteChecksButton.tsx | 2 +- .../asset-checks/VirtualizedAssetCheckTable.tsx | 2 +- .../AssetDaemonTicksQuery.tsx | 3 +-- .../AutomaterializationTickDetailDialog.tsx | 2 +- .../GlobalAutomaterializationContent.tsx | 2 +- .../lineage/useColumnLineageDataForAssets.tsx | 2 +- .../assets/useAutomaterializeDaemonStatus.tsx | 2 +- .../src/assets/useLatestPartitionEvents.tsx | 2 +- .../src/assets/usePaginatedAssetEvents.tsx | 2 +- .../src/assets/usePartitionHealthData.tsx | 2 +- .../src/assets/usePartitionNameForPipeline.tsx | 2 +- .../ui-core/src/assets/useRecentAssetEvents.tsx | 2 +- .../ui-core/src/assets/useReportEventsModal.tsx | 2 +- .../ui-core/src/assets/useWipeAssets.tsx | 2 +- .../AutomationAssetSelectionFragment.tsx | 3 +-- .../automation/AutomationStateChangeDialog.tsx | 2 +- .../VirtualizedAutomationScheduleRow.tsx | 2 +- .../VirtualizedAutomationSensorRow.tsx | 2 +- .../src/code-location/CodeLocationAssetsList.tsx | 2 +- .../src/code-location/CodeLocationGraphsList.tsx | 2 +- .../src/code-location/CodeLocationOpsView.tsx | 2 +- .../src/configeditor/ConfigEditorUtils.tsx | 2 +- .../ui-core/src/dagstertype/DagsterType.tsx | 2 +- .../packages/ui-core/src/gantt/RunGroupPanel.tsx | 2 +- .../ui-core/src/gantt/toGraphQueryItems.tsx | 3 +-- .../packages/ui-core/src/graph/OpGraph.tsx | 2 +- .../packages/ui-core/src/graph/OpNode.tsx | 2 +- .../packages/ui-core/src/instance/DaemonList.tsx | 2 +- .../ui-core/src/instance/InstanceBackfills.tsx | 2 +- .../ui-core/src/instance/InstanceConcurrency.tsx | 2 +- .../ui-core/src/instance/InstanceConfig.tsx | 2 +- .../src/instance/InstanceHealthFragment.tsx | 3 +-- .../ui-core/src/instance/InstanceHealthPage.tsx | 2 +- .../ui-core/src/instance/InstanceTabs.tsx | 2 +- .../packages/ui-core/src/instance/JobMenu.tsx | 2 +- .../packages/ui-core/src/instance/NextTick.tsx | 2 +- .../ui-core/src/instance/StepSummaryForRun.tsx | 2 +- .../VirtualizedInstanceConcurrencyTable.tsx | 2 +- .../instance/backfill/BackfillActionsMenu.tsx | 2 +- .../src/instance/backfill/BackfillLogsTab.tsx | 2 +- .../src/instance/backfill/BackfillPage.tsx | 2 +- .../instance/backfill/BackfillPartitionsTab.tsx | 2 +- .../src/instance/backfill/BackfillRow.tsx | 2 +- .../backfill/BackfillStepStatusDialog.tsx | 2 +- .../src/instance/backfill/BackfillTable.tsx | 2 +- .../backfill/BackfillTerminationDialog.tsx | 2 +- .../src/instance/backfill/BackfillUtils.tsx | 3 +-- .../ui-core/src/instance/useCanSeeConfig.tsx | 3 +-- .../ui-core/src/instance/useDaemonStatus.tsx | 2 +- .../ui-core/src/instance/useRunQueueConfig.tsx | 3 +-- .../instigation/InstigationStateBaseFragment.tsx | 2 +- .../ui-core/src/instigation/InstigationTick.tsx | 2 +- .../ui-core/src/instigation/InstigationUtils.tsx | 2 +- .../src/instigation/TickDetailsDialog.tsx | 2 +- .../ui-core/src/instigation/TickHistory.tsx | 2 +- .../ui-core/src/jobs/JobsPageContent.tsx | 2 +- .../src/launchpad/ConfigEditorConfigPicker.tsx | 2 +- .../ui-core/src/launchpad/ConfigFetch.tsx | 3 +-- .../src/launchpad/LaunchpadAllowedRoot.tsx | 2 +- .../ui-core/src/launchpad/LaunchpadSession.tsx | 2 +- .../src/launchpad/LaunchpadSetupFromRunRoot.tsx | 2 +- .../ui-core/src/launchpad/OpSelector.tsx | 2 +- .../ui-core/src/launchpad/RunPreview.tsx | 2 +- .../src/launchpad/useLaunchWithTelemetry.ts | 2 +- .../src/metadata/MetadataEntryFragment.tsx | 3 +-- .../ui-core/src/metadata/TableSchemaFragment.tsx | 2 +- .../packages/ui-core/src/nav/JobMetadata.tsx | 2 +- .../packages/ui-core/src/nav/LatestRunTag.tsx | 2 +- .../packages/ui-core/src/nav/LeftNavItem.tsx | 2 +- .../src/nav/RepositoryLocationStateObserver.tsx | 2 +- .../packages/ui-core/src/nav/VersionNumber.tsx | 2 +- .../src/nav/useRepositoryLocationReload.tsx | 2 +- .../packages/ui-core/src/ops/OpCard.tsx | 2 +- .../packages/ui-core/src/ops/OpDetailsRoot.tsx | 2 +- .../packages/ui-core/src/ops/OpTypeSignature.tsx | 2 +- .../packages/ui-core/src/ops/OpsRoot.tsx | 2 +- .../overview/BasicInstigationStateFragment.tsx | 2 +- .../src/overview/OverviewResourcesRoot.tsx | 2 +- .../ui-core/src/overview/OverviewSchedules.tsx | 2 +- .../ui-core/src/overview/OverviewSensors.tsx | 2 +- .../ui-core/src/overview/OverviewTabs.tsx | 2 +- .../ui-core/src/partitions/BackfillMessaging.tsx | 2 +- .../ui-core/src/partitions/BackfillSelector.tsx | 2 +- .../src/partitions/CreatePartitionDialog.tsx | 2 +- .../ui-core/src/partitions/JobBackfillsTable.tsx | 2 +- .../src/partitions/OpJobPartitionsView.tsx | 2 +- .../ui-core/src/partitions/PartitionRunList.tsx | 2 +- .../src/partitions/PartitionStepStatus.tsx | 2 +- .../ui-core/src/partitions/useMatrixData.tsx | 3 +-- .../src/partitions/usePartitionStepQuery.tsx | 2 +- .../ui-core/src/performance/TraceContext.tsx | 2 +- .../performance/__tests__/TraceContext.test.tsx | 2 +- .../ui-core/src/pipelines/GraphExplorer.tsx | 2 +- .../src/pipelines/PipelineExplorerRoot.tsx | 2 +- .../ui-core/src/pipelines/PipelineRunsRoot.tsx | 2 +- .../src/pipelines/SidebarContainerOverview.tsx | 2 +- .../packages/ui-core/src/pipelines/SidebarOp.tsx | 2 +- .../src/pipelines/SidebarOpDefinition.tsx | 2 +- .../src/pipelines/SidebarOpExecutionGraphs.tsx | 2 +- .../src/pipelines/SidebarOpInvocation.tsx | 2 +- .../src/pipelines/SidebarResourcesSection.tsx | 2 +- .../ui-core/src/resources/ResourceRoot.tsx | 2 +- .../src/resources/WorkspaceResourcesRoot.tsx | 2 +- .../ui-core/src/runs/CapturedLogPanel.tsx | 2 +- .../packages/ui-core/src/runs/DeletionDialog.tsx | 2 +- .../packages/ui-core/src/runs/LogsProvider.tsx | 14 +++++++------- .../packages/ui-core/src/runs/LogsRow.tsx | 2 +- .../runs/LogsScrollingTableMessageFragment.tsx | 3 +-- .../ui-core/src/runs/QueuedRunCriteriaDialog.tsx | 2 +- .../ui-core/src/runs/QueuedRunCriteriaQuery.tsx | 2 +- .../ui-core/src/runs/QueuedRunsBanners.tsx | 2 +- .../ui-core/src/runs/ReexecutionDialog.tsx | 2 +- .../packages/ui-core/src/runs/RunActionsMenu.tsx | 2 +- .../packages/ui-core/src/runs/RunAssetTags.tsx | 3 +-- .../packages/ui-core/src/runs/RunFragments.tsx | 3 +-- .../ui-core/src/runs/RunHeaderActions.tsx | 2 +- .../packages/ui-core/src/runs/RunListTabs.tsx | 2 +- .../ui-core/src/runs/RunMetadataProvider.tsx | 2 +- .../packages/ui-core/src/runs/RunRoot.tsx | 2 +- .../packages/ui-core/src/runs/RunStats.tsx | 2 +- .../ui-core/src/runs/RunTableRunFragment.tsx | 3 +-- .../ui-core/src/runs/RunTagsFragment.tsx | 2 +- .../ui-core/src/runs/RunTimingDetails.tsx | 2 +- .../packages/ui-core/src/runs/RunUtils.tsx | 2 +- .../ui-core/src/runs/RunsFilterInput.tsx | 2 +- .../packages/ui-core/src/runs/RunsRoot.tsx | 2 +- .../ui-core/src/runs/ScheduledRunListRoot.tsx | 2 +- .../ui-core/src/runs/TerminateAllRunsButton.tsx | 2 +- .../ui-core/src/runs/TerminationDialog.tsx | 2 +- .../runs/__tests__/RunActionButtonsTestQuery.tsx | 3 +-- .../src/runs/useCursorAccumulatedQuery.tsx | 2 +- .../ui-core/src/runs/useCursorPaginatedQuery.tsx | 2 +- .../ui-core/src/runs/useJobReExecution.tsx | 2 +- .../src/runs/usePaginatedRunsTableRuns.tsx | 3 +-- .../ui-core/src/runs/useRunsForTimeline.tsx | 2 +- .../schedules/ScheduleAssetSelectionsQuery.tsx | 3 +-- .../ui-core/src/schedules/ScheduleMutations.tsx | 3 +-- .../src/schedules/SchedulePartitionStatus.tsx | 2 +- .../src/schedules/ScheduleResetButton.tsx | 2 +- .../ui-core/src/schedules/ScheduleRoot.tsx | 2 +- .../src/schedules/ScheduleStateChangeDialog.tsx | 2 +- .../ui-core/src/schedules/ScheduleSwitch.tsx | 2 +- .../ui-core/src/schedules/ScheduleUtils.tsx | 3 +-- .../ui-core/src/schedules/SchedulesNextTicks.tsx | 2 +- .../__tests__/useIndexedDBCachedQuery.test.tsx | 2 +- .../ui-core/src/search/useGlobalSearch.tsx | 2 +- .../src/search/useIndexedDBCachedQuery.tsx | 10 +++++----- .../src/sensors/AssetSensorTicksQuery.tsx | 3 +-- .../ui-core/src/sensors/EditCursorDialog.tsx | 2 +- .../ui-core/src/sensors/SensorFragment.tsx | 3 +-- .../ui-core/src/sensors/SensorMutations.tsx | 3 +-- .../src/sensors/SensorPageAutomaterialize.tsx | 2 +- .../ui-core/src/sensors/SensorPreviousRuns.tsx | 2 +- .../ui-core/src/sensors/SensorResetButton.tsx | 2 +- .../packages/ui-core/src/sensors/SensorRoot.tsx | 2 +- .../src/sensors/SensorStateChangeDialog.tsx | 2 +- .../ui-core/src/sensors/SensorStateQuery.tsx | 3 +-- .../ui-core/src/sensors/SensorSwitch.tsx | 2 +- .../ui-core/src/snapshots/SnapshotNav.tsx | 2 +- .../ui-core/src/testing/ApolloTestProvider.tsx | 2 +- .../ui-core/src/testing/MockedApolloLinks.tsx | 2 +- .../__tests__/ApolloTestProvider.test.tsx | 2 +- .../packages/ui-core/src/testing/mocking.ts | 3 ++- .../ui-core/src/ticks/EvaluateScheduleDialog.tsx | 2 +- .../src/ticks/InstigationEventLogTable.tsx | 2 +- .../ui-core/src/ticks/RunRequestFragment.tsx | 2 +- .../ui-core/src/ticks/SensorDryRunDialog.tsx | 2 +- .../packages/ui-core/src/ticks/TickLogDialog.tsx | 2 +- .../__tests__/EvaluateScheduleDialog.test.tsx | 2 +- .../ticks/__tests__/SensorDryRunDialog.test.tsx | 2 +- .../src/typeexplorer/ConfigTypeSchema.tsx | 2 +- .../ui-core/src/typeexplorer/TypeExplorer.tsx | 2 +- .../src/typeexplorer/TypeExplorerContainer.tsx | 3 +-- .../ui-core/src/typeexplorer/TypeList.tsx | 2 +- .../src/typeexplorer/TypeListContainer.tsx | 2 +- .../ui-core/src/typeexplorer/TypeWithTooltip.tsx | 3 ++- .../packages/ui-core/src/ui/Loading.tsx | 2 +- .../packages/ui-core/src/workspace/GraphRoot.tsx | 2 +- .../src/workspace/RepositoryInformation.tsx | 3 +-- .../src/workspace/VirtualizedAssetRow.tsx | 2 +- .../src/workspace/VirtualizedGraphTable.tsx | 2 +- .../ui-core/src/workspace/VirtualizedJobRow.tsx | 2 +- .../src/workspace/VirtualizedScheduleRow.tsx | 2 +- .../src/workspace/VirtualizedSensorRow.tsx | 2 +- .../src/workspace/VirtualizedWorkspaceTable.tsx | 2 +- .../src/workspace/WorkspaceAssetsQuery.tsx | 3 +-- .../src/workspace/WorkspaceAssetsRoot.tsx | 2 +- .../ui-core/src/workspace/WorkspaceContext.tsx | 2 +- .../src/workspace/WorkspaceGraphsQuery.tsx | 3 +-- .../src/workspace/WorkspaceGraphsRoot.tsx | 2 +- .../ui-core/src/workspace/WorkspaceJobsRoot.tsx | 2 +- .../ui-core/src/workspace/WorkspaceQueries.tsx | 3 +-- .../src/workspace/WorkspaceSchedulesRoot.tsx | 2 +- .../src/workspace/WorkspaceSensorsRoot.tsx | 2 +- 246 files changed, 265 insertions(+), 297 deletions(-) diff --git a/js_modules/dagster-ui/packages/ui-core/src/app/AppCache.tsx b/js_modules/dagster-ui/packages/ui-core/src/app/AppCache.tsx index f32cb27e343b2..c1fd03e495bd2 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/app/AppCache.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/app/AppCache.tsx @@ -1,5 +1,4 @@ -import {InMemoryCache} from '@apollo/client'; - +import {InMemoryCache} from '../apollo-client'; import possibleTypes from '../graphql/possibleTypes.generated.json'; export const createAppCache = () => diff --git a/js_modules/dagster-ui/packages/ui-core/src/app/AppProvider.tsx b/js_modules/dagster-ui/packages/ui-core/src/app/AppProvider.tsx index 80c7b3db73095..04ded45992666 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/app/AppProvider.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/app/AppProvider.tsx @@ -1,11 +1,3 @@ -import { - ApolloClient, - ApolloLink, - ApolloProvider, - HttpLink, - InMemoryCache, - split, -} from '@apollo/client'; import {RetryLink} from '@apollo/client/link/retry'; import {WebSocketLink} from '@apollo/client/link/ws'; import {getMainDefinition} from '@apollo/client/utilities'; @@ -30,6 +22,14 @@ import {WebSocketProvider} from './WebSocketProvider'; import {AnalyticsContext, dummyAnalytics} from './analytics'; import {migrateLocalStorageKeys} from './migrateLocalStorageKeys'; import {TimeProvider} from './time/TimeContext'; +import { + ApolloClient, + ApolloLink, + ApolloProvider, + HttpLink, + InMemoryCache, + split, +} from '../apollo-client'; import {AssetLiveDataProvider} from '../asset-data/AssetLiveDataProvider'; import {AssetRunLogObserver} from '../asset-graph/AssetRunLogObserver'; import {CodeLinkProtocolProvider} from '../code-links/CodeLinkProtocol'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/app/OperationQueryStringApolloLink.ts b/js_modules/dagster-ui/packages/ui-core/src/app/OperationQueryStringApolloLink.ts index e13d190f940f4..1e45c83cd898f 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/app/OperationQueryStringApolloLink.ts +++ b/js_modules/dagster-ui/packages/ui-core/src/app/OperationQueryStringApolloLink.ts @@ -1,4 +1,4 @@ -import {ApolloLink} from '@apollo/client'; +import {ApolloLink} from '../apollo-client'; export const createOperationQueryStringApolloLink = (basePath: string) => new ApolloLink((operation, forward) => { diff --git a/js_modules/dagster-ui/packages/ui-core/src/app/Permissions.tsx b/js_modules/dagster-ui/packages/ui-core/src/app/Permissions.tsx index 0b98aaa502e0f..7910ce7210c72 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/app/Permissions.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/app/Permissions.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import * as React from 'react'; import { @@ -6,6 +5,7 @@ import { PermissionsQuery, PermissionsQueryVariables, } from './types/Permissions.types'; +import {gql, useQuery} from '../apollo-client'; import {useBlockTraceOnQueryResult} from '../performance/TraceContext'; // used in tests, to ensure against permission renames. Should make sure that the mapping in diff --git a/js_modules/dagster-ui/packages/ui-core/src/app/PythonErrorFragment.tsx b/js_modules/dagster-ui/packages/ui-core/src/app/PythonErrorFragment.tsx index bfb9b64ea1dc1..58265d78ee05d 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/app/PythonErrorFragment.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/app/PythonErrorFragment.tsx @@ -1,4 +1,4 @@ -import {gql} from '@apollo/client'; +import {gql} from '../apollo-client'; export const PYTHON_ERROR_FRAGMENT = gql` fragment PythonErrorFragment on PythonError { diff --git a/js_modules/dagster-ui/packages/ui-core/src/app/PythonErrorInfo.tsx b/js_modules/dagster-ui/packages/ui-core/src/app/PythonErrorInfo.tsx index 29c7a90c7984c..5b4b92f9111e6 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/app/PythonErrorInfo.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/app/PythonErrorInfo.tsx @@ -1,4 +1,3 @@ -import {gql} from '@apollo/client'; import {Button, Colors, FontFamily, Icon} from '@dagster-io/ui-components'; import {Fragment, useRef} from 'react'; import styled from 'styled-components'; @@ -6,6 +5,7 @@ import styled from 'styled-components'; import {showSharedToaster} from './DomUtils'; import {useCopyToClipboard} from './browser'; import {PythonErrorChainFragment, PythonErrorFragment} from './types/PythonErrorFragment.types'; +import {gql} from '../apollo-client'; import {ErrorSource} from '../graphql/types'; import {useLaunchPadHooks} from '../launchpad/LaunchpadHooksContext'; import {MetadataEntries} from '../metadata/MetadataEntry'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/app/QueryRefresh.tsx b/js_modules/dagster-ui/packages/ui-core/src/app/QueryRefresh.tsx index a4e343a363dc8..5f313361c6e4e 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/app/QueryRefresh.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/app/QueryRefresh.tsx @@ -1,7 +1,7 @@ -import {NetworkStatus, ObservableQuery, QueryResult} from '@apollo/client'; import {RefreshableCountdown, useCountdown} from '@dagster-io/ui-components'; import {useCallback, useEffect, useMemo, useRef, useState} from 'react'; +import {NetworkStatus, ObservableQuery, QueryResult} from '../apollo-client'; import {useDocumentVisibility} from '../hooks/useDocumentVisibility'; import {isSearchVisible, useSearchVisibility} from '../search/useSearchVisibility'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/app/Telemetry.tsx b/js_modules/dagster-ui/packages/ui-core/src/app/Telemetry.tsx index 7abe4edfd6e56..ce8133c042eb1 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/app/Telemetry.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/app/Telemetry.tsx @@ -1,4 +1,3 @@ -import {gql} from '@apollo/client'; import {print} from 'graphql'; import memoize from 'lodash/memoize'; import {useCallback, useContext} from 'react'; @@ -6,6 +5,7 @@ import {v4 as uuidv4} from 'uuid'; import {AppContext} from './AppContext'; import {PYTHON_ERROR_FRAGMENT} from './PythonErrorFragment'; +import {gql} from '../apollo-client'; export enum TelemetryAction { LAUNCH_RUN = 'LAUNCH_RUN', diff --git a/js_modules/dagster-ui/packages/ui-core/src/app/apolloLinks.tsx b/js_modules/dagster-ui/packages/ui-core/src/app/apolloLinks.tsx index 4725f400f7e90..40ec49199dcc8 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/app/apolloLinks.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/app/apolloLinks.tsx @@ -1,6 +1,5 @@ -import {ApolloLink} from '@apollo/client'; - import {debugLog, formatElapsedTimeWithMsec} from './Util'; +import {ApolloLink} from '../apollo-client'; const getCalls = (response: any) => { try { diff --git a/js_modules/dagster-ui/packages/ui-core/src/asset-data/AssetBaseDataProvider.tsx b/js_modules/dagster-ui/packages/ui-core/src/asset-data/AssetBaseDataProvider.tsx index 97418565d537a..24100530cccde 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/asset-data/AssetBaseDataProvider.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/asset-data/AssetBaseDataProvider.tsx @@ -1,10 +1,10 @@ -import {ApolloClient, gql, useApolloClient} from '@apollo/client'; import React from 'react'; import { AssetGraphLiveQuery, AssetGraphLiveQueryVariables, } from './types/AssetBaseDataProvider.types'; +import {ApolloClient, gql, useApolloClient} from '../apollo-client'; import { LiveDataForNode, buildLiveDataForNode, diff --git a/js_modules/dagster-ui/packages/ui-core/src/asset-data/AssetStaleStatusDataProvider.tsx b/js_modules/dagster-ui/packages/ui-core/src/asset-data/AssetStaleStatusDataProvider.tsx index 7e8cfca8de4c8..3fbf2d723242f 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/asset-data/AssetStaleStatusDataProvider.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/asset-data/AssetStaleStatusDataProvider.tsx @@ -1,10 +1,10 @@ -import {ApolloClient, gql, useApolloClient} from '@apollo/client'; import React from 'react'; import { AssetStaleStatusDataQuery, AssetStaleStatusDataQueryVariables, } from './types/AssetStaleStatusDataProvider.types'; +import {ApolloClient, gql, useApolloClient} from '../apollo-client'; import {tokenForAssetKey, tokenToAssetKey} from '../asset-graph/Utils'; import {AssetKeyInput} from '../graphql/types'; import {liveDataFactory} from '../live-data-provider/Factory'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetGraphJobSidebar.tsx b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetGraphJobSidebar.tsx index 31122f2851425..cf5ba33978eb8 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetGraphJobSidebar.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetGraphJobSidebar.tsx @@ -1,9 +1,8 @@ -import {gql, useQuery} from '@apollo/client'; - import { AssetGraphSidebarQuery, AssetGraphSidebarQueryVariables, } from './types/AssetGraphJobSidebar.types'; +import {gql, useQuery} from '../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {PipelineSelector} from '../graphql/types'; import {useBlockTraceOnQueryResult} from '../performance/TraceContext'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetNode.tsx b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetNode.tsx index 8f1170499695b..6be0f94f6440d 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetNode.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetNode.tsx @@ -1,4 +1,3 @@ -import {gql} from '@apollo/client'; import {Box, Colors, FontFamily, Icon, Tooltip} from '@dagster-io/ui-components'; import isEqual from 'lodash/isEqual'; import * as React from 'react'; @@ -11,6 +10,7 @@ import {ContextMenuWrapper} from './ContextMenuWrapper'; import {LiveDataForNode} from './Utils'; import {ASSET_NODE_NAME_MAX_LENGTH} from './layout'; import {AssetNodeFragment} from './types/AssetNode.types'; +import {gql} from '../apollo-client'; import {withMiddleTruncation} from '../app/Util'; import {useAssetLiveData} from '../asset-data/AssetLiveDataProvider'; import {PartitionCountTags} from '../assets/AssetNodePartitionCounts'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetRunLogObserver.tsx b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetRunLogObserver.tsx index f62a26d31c6ad..2a54897b8146e 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetRunLogObserver.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetRunLogObserver.tsx @@ -1,10 +1,10 @@ -import {gql, useSubscription} from '@apollo/client'; import {memo, useCallback, useEffect, useRef, useState} from 'react'; import { AssetLiveRunLogsSubscription, AssetLiveRunLogsSubscriptionVariables, } from './types/AssetRunLogObserver.types'; +import {gql, useSubscription} from '../apollo-client'; import {AssetKey} from '../graphql/types'; const OBSERVED_RUNS_CHANGED = 'observed-runs-changed'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/SidebarAssetInfo.tsx b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/SidebarAssetInfo.tsx index 3bd476ed9f0b9..674836b734fbd 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/SidebarAssetInfo.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/SidebarAssetInfo.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import {Box, Colors, ConfigTypeSchema, Icon, Spinner} from '@dagster-io/ui-components'; import {Link} from 'react-router-dom'; import styled from 'styled-components'; @@ -6,6 +5,7 @@ import styled from 'styled-components'; import {GraphNode, displayNameForAssetKey, nodeDependsOnSelf, stepKeyForAsset} from './Utils'; import {SidebarAssetQuery, SidebarAssetQueryVariables} from './types/SidebarAssetInfo.types'; import {AssetNodeForGraphQueryFragment} from './types/useAssetGraphData.types'; +import {gql, useQuery} from '../apollo-client'; import {COMMON_COLLATOR} from '../app/Util'; import {useAssetLiveData} from '../asset-data/AssetLiveDataProvider'; import {ASSET_NODE_CONFIG_FRAGMENT} from '../assets/AssetConfig'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/useAssetGraphData.tsx b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/useAssetGraphData.tsx index b2a43ff08d950..cdb6bb915445f 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/useAssetGraphData.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/useAssetGraphData.tsx @@ -1,4 +1,3 @@ -import {gql} from '@apollo/client'; import groupBy from 'lodash/groupBy'; import keyBy from 'lodash/keyBy'; import reject from 'lodash/reject'; @@ -11,6 +10,7 @@ import { AssetGraphQueryVariables, AssetNodeForGraphQueryFragment, } from './types/useAssetGraphData.types'; +import {gql} from '../apollo-client'; import {usePrefixedCacheKey} from '../app/AppProvider'; import {GraphQueryItem, filterByQuery} from '../app/GraphQueryImpl'; import {AssetKey} from '../assets/types'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/useFindAssetLocation.tsx b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/useFindAssetLocation.tsx index 9e825edd1dcfa..db0f3a133d5bd 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/useFindAssetLocation.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/useFindAssetLocation.tsx @@ -1,4 +1,3 @@ -import {gql, useApolloClient} from '@apollo/client'; import {useCallback} from 'react'; import {isHiddenAssetGroupJob} from './Utils'; @@ -6,6 +5,7 @@ import { AssetForNavigationQuery, AssetForNavigationQueryVariables, } from './types/useFindAssetLocation.types'; +import {gql, useApolloClient} from '../apollo-client'; import {AssetKey} from '../assets/types'; import {AssetKeyInput} from '../graphql/types'; import {buildRepoAddress} from '../workspace/buildRepoAddress'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetConfig.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetConfig.tsx index 9d24232508ca1..c88c7b4d41d0e 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetConfig.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetConfig.tsx @@ -1,5 +1,4 @@ -import {gql} from '@apollo/client'; - +import {gql} from '../apollo-client'; import {CONFIG_TYPE_SCHEMA_FRAGMENT} from '../typeexplorer/ConfigTypeSchema'; export const ASSET_NODE_CONFIG_FRAGMENT = gql` diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetDefinedInMultipleReposNotice.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetDefinedInMultipleReposNotice.tsx index 593375261c3b6..d063101e6ff77 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetDefinedInMultipleReposNotice.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetDefinedInMultipleReposNotice.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import {Alert, Box, ButtonLink, Colors} from '@dagster-io/ui-components'; import {AssetKey} from './types'; @@ -6,6 +5,7 @@ import { AssetDefinitionCollisionQuery, AssetDefinitionCollisionQueryVariables, } from './types/AssetDefinedInMultipleReposNotice.types'; +import {gql, useQuery} from '../apollo-client'; import {showCustomAlert} from '../app/CustomAlertProvider'; import {displayNameForAssetKey} from '../asset-graph/Utils'; import {buildRepoPathForHuman} from '../workspace/buildRepoAddress'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetGroupRoot.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetGroupRoot.tsx index b05bbb9137076..4c757c0ea8ba7 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetGroupRoot.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetGroupRoot.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import {Box, Heading, Page, PageHeader, Tabs, Tag} from '@dagster-io/ui-components'; import React, {useCallback, useMemo} from 'react'; import {useHistory, useParams} from 'react-router-dom'; @@ -12,6 +11,7 @@ import { AssetGroupMetadataQuery, AssetGroupMetadataQueryVariables, } from './types/AssetGroupRoot.types'; +import {gql, useQuery} from '../apollo-client'; import {useTrackPageView} from '../app/analytics'; import {AssetGraphExplorer} from '../asset-graph/AssetGraphExplorer'; import {AssetLocation} from '../asset-graph/useFindAssetLocation'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetLineageElements.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetLineageElements.tsx index 6a77130410b41..7138c1331ac65 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetLineageElements.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetLineageElements.tsx @@ -1,10 +1,10 @@ -import {gql} from '@apollo/client'; import {Box, ButtonLink, Tooltip} from '@dagster-io/ui-components'; import * as React from 'react'; import {Link} from 'react-router-dom'; import {assetDetailsPathForKey} from './assetDetailsPathForKey'; import {AssetLineageFragment} from './types/AssetLineageElements.types'; +import {gql} from '../apollo-client'; import {Timestamp} from '../app/time/Timestamp'; const AssetLineageInfoElement = ({ diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetMaterializationUpstreamData.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetMaterializationUpstreamData.tsx index 661ecf450f87b..e712d7de216e8 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetMaterializationUpstreamData.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetMaterializationUpstreamData.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import {Box, Caption, Colors, Icon, MiddleTruncate} from '@dagster-io/ui-components'; import dayjs from 'dayjs'; import relativeTime from 'dayjs/plugin/relativeTime'; @@ -13,6 +12,7 @@ import { AssetMaterializationUpstreamTableFragment, MaterializationUpstreamDataVersionFragment, } from './types/AssetMaterializationUpstreamData.types'; +import {gql, useQuery} from '../apollo-client'; import {Timestamp} from '../app/time/Timestamp'; import {displayNameForAssetKey} from '../asset-graph/Utils'; import {AssetKeyInput} from '../graphql/types'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetMetadata.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetMetadata.tsx index 9f2e59d2044ca..2ed606efa2ef1 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetMetadata.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetMetadata.tsx @@ -1,7 +1,7 @@ -import {gql} from '@apollo/client'; import {Box, MetadataTable} from '@dagster-io/ui-components'; import {AssetNodeOpMetadataFragment} from './types/AssetMetadata.types'; +import {gql} from '../apollo-client'; import {DAGSTER_TYPE_FRAGMENT} from '../dagstertype/DagsterType'; import {DagsterTypeFragment} from '../dagstertype/types/DagsterType.types'; import {HIDDEN_METADATA_ENTRY_LABELS, MetadataEntry} from '../metadata/MetadataEntry'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetNodeDefinition.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetNodeDefinition.tsx index a89ae10dc99b6..ab03d5e7b49fe 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetNodeDefinition.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetNodeDefinition.tsx @@ -1,4 +1,3 @@ -import {gql} from '@apollo/client'; import { Body, Box, @@ -25,6 +24,7 @@ import {OverdueTag, freshnessPolicyDescription} from './OverdueTag'; import {UnderlyingOpsOrGraph} from './UnderlyingOpsOrGraph'; import {Version} from './Version'; import {AssetNodeDefinitionFragment} from './types/AssetNodeDefinition.types'; +import {gql} from '../apollo-client'; import {COMMON_COLLATOR} from '../app/Util'; import {ASSET_NODE_FRAGMENT} from '../asset-graph/AssetNode'; import {isHiddenAssetGroupJob} from '../asset-graph/Utils'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetNodeInstigatorTag.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetNodeInstigatorTag.tsx index 10e67d4b2a7ce..10b80818fc6f2 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetNodeInstigatorTag.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetNodeInstigatorTag.tsx @@ -1,7 +1,7 @@ -import {gql} from '@apollo/client'; import {useMemo} from 'react'; import {AssetNodeInstigatorsFragment} from './types/AssetNodeInstigatorTag.types'; +import {gql} from '../apollo-client'; import {ScheduleOrSensorTag} from '../nav/ScheduleOrSensorTag'; import {SCHEDULE_SWITCH_FRAGMENT} from '../schedules/ScheduleSwitch'; import {ScheduleSwitchFragment} from '../schedules/types/ScheduleSwitch.types'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetPartitionDetail.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetPartitionDetail.tsx index 714bab0463dd6..f72a176b9e78c 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetPartitionDetail.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetPartitionDetail.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import { Alert, Box, @@ -33,6 +32,7 @@ import { } from './types/AssetPartitionDetail.types'; import {AssetObservationFragment} from './types/useRecentAssetEvents.types'; import {ASSET_MATERIALIZATION_FRAGMENT, ASSET_OBSERVATION_FRAGMENT} from './useRecentAssetEvents'; +import {gql, useQuery} from '../apollo-client'; import {Timestamp} from '../app/time/Timestamp'; import {AssetStaleDataFragment} from '../asset-data/types/AssetStaleStatusDataProvider.types'; import {isHiddenAssetGroupJob, stepKeyForAsset} from '../asset-graph/Utils'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetTable.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetTable.tsx index 686734271d84e..8d6b89502e9a4 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetTable.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetTable.tsx @@ -1,4 +1,3 @@ -import {RefetchQueriesFunction} from '@apollo/client'; import { Box, Button, @@ -19,6 +18,7 @@ import {AssetWipeDialog} from 'shared/assets/AssetWipeDialog.oss'; import {LaunchAssetExecutionButton} from './LaunchAssetExecutionButton'; import {AssetTableFragment} from './types/AssetTableFragment.types'; import {AssetViewType} from './useAssetView'; +import {RefetchQueriesFunction} from '../apollo-client'; import {CloudOSSContext} from '../app/CloudOSSContext'; import {useUnscopedPermissions} from '../app/Permissions'; import {QueryRefreshCountdown, RefreshState} from '../app/QueryRefresh'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetTableFragment.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetTableFragment.tsx index e3dbb48636906..beb7217d26e3b 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetTableFragment.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetTableFragment.tsx @@ -1,4 +1,4 @@ -import {gql} from '@apollo/client'; +import {gql} from '../apollo-client'; export const ASSET_TABLE_DEFINITION_FRAGMENT = gql` fragment AssetTableDefinitionFragment on AssetNode { diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetView.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetView.tsx index fddeeb93a64de..98a2f92810caa 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetView.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetView.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; // eslint-disable-next-line no-restricted-imports import {BreadcrumbProps} from '@blueprintjs/core'; import {Alert, Box, ErrorBoundary, NonIdealState, Spinner, Tag} from '@dagster-io/ui-components'; @@ -33,6 +32,7 @@ import {useDeleteDynamicPartitionsDialog} from './useDeleteDynamicPartitionsDial import {healthRefreshHintFromLiveData} from './usePartitionHealthData'; import {useReportEventsModal} from './useReportEventsModal'; import {useWipeModal} from './useWipeModal'; +import {gql, useQuery} from '../apollo-client'; import {currentPageAtom} from '../app/analytics'; import {Timestamp} from '../app/time/Timestamp'; import {AssetLiveDataRefreshButton, useAssetLiveData} from '../asset-data/AssetLiveDataProvider'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetWipeDialog.oss.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetWipeDialog.oss.tsx index fcc98bc24314d..ba3919a3c05b2 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetWipeDialog.oss.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetWipeDialog.oss.tsx @@ -1,4 +1,3 @@ -import {RefetchQueriesFunction} from '@apollo/client'; // eslint-disable-next-line no-restricted-imports import {ProgressBar} from '@blueprintjs/core'; import { @@ -16,6 +15,7 @@ import {memo, useMemo} from 'react'; import {VirtualizedSimpleAssetKeyList} from './VirtualizedSimpleAssetKeyList'; import {asAssetPartitionRangeInput} from './asInput'; import {useWipeAssets} from './useWipeAssets'; +import {RefetchQueriesFunction} from '../apollo-client'; import {AssetKeyInput} from '../graphql/types'; import {NavigationBlock} from '../runs/NavigationBlock'; import {numberFormatter} from '../ui/formatters'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetsCatalogTable.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetsCatalogTable.tsx index 13a6cc87d84c9..0e9ea1c38ad4f 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetsCatalogTable.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetsCatalogTable.tsx @@ -1,4 +1,3 @@ -import {gql, useApolloClient} from '@apollo/client'; import {Box, ButtonGroup} from '@dagster-io/ui-components'; import * as React from 'react'; import {useCallback, useContext, useEffect, useLayoutEffect, useMemo, useState} from 'react'; @@ -20,6 +19,7 @@ import { } from './types/AssetsCatalogTable.types'; import {AssetViewType, useAssetView} from './useAssetView'; import {useBasicAssetSearchInput} from './useBasicAssetSearchInput'; +import {gql, useApolloClient} from '../apollo-client'; import {AppContext} from '../app/AppContext'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {PythonErrorInfo} from '../app/PythonErrorInfo'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetsOverviewRoot.oss.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetsOverviewRoot.oss.tsx index 56e6c78b24a4d..ca60eaf8b00eb 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetsOverviewRoot.oss.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetsOverviewRoot.oss.tsx @@ -1,4 +1,3 @@ -import {gql} from '@apollo/client'; // eslint-disable-next-line no-restricted-imports import {BreadcrumbProps} from '@blueprintjs/core'; import {Box} from '@dagster-io/ui-components'; @@ -10,6 +9,7 @@ import {AssetView} from './AssetView'; import {AssetsCatalogTable} from './AssetsCatalogTable'; import {assetDetailsPathForKey} from './assetDetailsPathForKey'; import {AssetKey, AssetViewParams} from './types'; +import {gql} from '../apollo-client'; import {useTrackPageView} from '../app/analytics'; import {displayNameForAssetKey} from '../asset-graph/Utils'; import {useDocumentTitle} from '../hooks/useDocumentTitle'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/AutomaterializeMiddlePanel.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/AutomaterializeMiddlePanel.tsx index 0147cfc06700d..f8b44f99bd997 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/AutomaterializeMiddlePanel.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/AutomaterializeMiddlePanel.tsx @@ -1,4 +1,3 @@ -import {useQuery} from '@apollo/client'; import {Body2, Box, NonIdealState, Subheading} from '@dagster-io/ui-components'; import React from 'react'; @@ -14,6 +13,7 @@ import { GetEvaluationsSpecificPartitionQuery, GetEvaluationsSpecificPartitionQueryVariables, } from './types/GetEvaluationsQuery.types'; +import {useQuery} from '../../apollo-client'; import {ErrorWrapper} from '../../app/PythonErrorInfo'; import {SensorType} from '../../graphql/types'; import {useQueryPersistedState} from '../../hooks/useQueryPersistedState'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/AutomaterializeMiddlePanelWithData.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/AutomaterializeMiddlePanelWithData.tsx index 313ca95c72718..1f3c711bafeac 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/AutomaterializeMiddlePanelWithData.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/AutomaterializeMiddlePanelWithData.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import { BaseTag, Box, @@ -29,6 +28,7 @@ import { AssetConditionEvaluationRecordFragment, GetEvaluationsSpecificPartitionQuery, } from './types/GetEvaluationsQuery.types'; +import {gql, useQuery} from '../../apollo-client'; import {formatElapsedTimeWithMsec} from '../../app/Util'; import {Timestamp} from '../../app/time/Timestamp'; import {DimensionPartitionKeys} from '../../graphql/types'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/AutomaterializeRequestedPartitionsLink.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/AutomaterializeRequestedPartitionsLink.tsx index 4844726f10a62..b199a39ff79d8 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/AutomaterializeRequestedPartitionsLink.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/AutomaterializeRequestedPartitionsLink.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import { Box, Button, @@ -21,6 +20,7 @@ import { RunStatusAndPartitionKeyQueryVariables, RunStatusAndTagsFragment, } from './types/AutomaterializeRequestedPartitionsLink.types'; +import {gql, useQuery} from '../../apollo-client'; import {showCustomAlert} from '../../app/CustomAlertProvider'; import {PYTHON_ERROR_FRAGMENT} from '../../app/PythonErrorFragment'; import {PythonErrorInfo} from '../../app/PythonErrorInfo'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/AutomaterializeRunTag.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/AutomaterializeRunTag.tsx index 61d95aceb7341..913a97f404e0e 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/AutomaterializeRunTag.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/AutomaterializeRunTag.tsx @@ -1,8 +1,8 @@ -import {gql, useQuery} from '@apollo/client'; import {Tag} from '@dagster-io/ui-components'; import {Link} from 'react-router-dom'; import {RunStatusOnlyQuery, RunStatusOnlyQueryVariables} from './types/AutomaterializeRunTag.types'; +import {gql, useQuery} from '../../apollo-client'; import {useBlockTraceOnQueryResult} from '../../performance/TraceContext'; import {RunStatusTagWithID} from '../../runs/RunStatusTag'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/AutomaterializeRunsTable.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/AutomaterializeRunsTable.tsx index b85ece631592b..73475359133aa 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/AutomaterializeRunsTable.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/AutomaterializeRunsTable.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import {Body2, Box, Colors, Mono, Table} from '@dagster-io/ui-components'; import {Link} from 'react-router-dom'; @@ -6,6 +5,7 @@ import { AutomaterializeRunsQuery, AutomaterializeRunsQueryVariables, } from './types/AutomaterializeRunsTable.types'; +import {gql, useQuery} from '../../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../../app/PythonErrorFragment'; import {PythonErrorInfo} from '../../app/PythonErrorInfo'; import {useBlockTraceOnQueryResult} from '../../performance/TraceContext'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/GetEvaluationsQuery.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/GetEvaluationsQuery.tsx index fa5c41b24f3ee..b1b28161aea35 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/GetEvaluationsQuery.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/GetEvaluationsQuery.tsx @@ -1,5 +1,4 @@ -import {gql} from '@apollo/client'; - +import {gql} from '../../apollo-client'; import {METADATA_ENTRY_FRAGMENT} from '../../metadata/MetadataEntryFragment'; const SpecificPartitionAssetConditionEvaluationNodeFragment = gql` diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/PartitionSubsetList.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/PartitionSubsetList.tsx index 2307db8b76947..f75d40a9d0a1b 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/PartitionSubsetList.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/PartitionSubsetList.tsx @@ -1,4 +1,3 @@ -import {useQuery} from '@apollo/client'; import { Box, Colors, @@ -20,6 +19,7 @@ import { PartitionSubsetListQuery, PartitionSubsetListQueryVariables, } from './types/PartitionSubsetListQuery.types'; +import {useQuery} from '../../apollo-client'; import {Container, Inner, Row} from '../../ui/VirtualizedTable'; interface Props { diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/PartitionSubsetListQuery.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/PartitionSubsetListQuery.tsx index 2ce21db1b49e5..1908af8f21e19 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/PartitionSubsetListQuery.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/PartitionSubsetListQuery.tsx @@ -1,4 +1,4 @@ -import {gql} from '@apollo/client'; +import {gql} from '../../apollo-client'; export const PARTITION_SUBSET_LIST_QUERY = gql` query PartitionSubsetListQuery( diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializeSensorFlag.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializeSensorFlag.tsx index 2b54d629ca787..7517dfef9be04 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializeSensorFlag.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializeSensorFlag.tsx @@ -1,9 +1,8 @@ -import {gql, useQuery} from '@apollo/client'; - import { AutoMaterializeSensorFlagQuery, AutoMaterializeSensorFlagQueryVariables, } from './types/AutoMaterializeSensorFlag.types'; +import {gql, useQuery} from '../apollo-client'; import {useBlockTraceOnQueryResult} from '../performance/TraceContext'; type FlagState = 'unknown' | 'has-sensor-amp' | 'has-global-amp'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/BackfillPreviewModal.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/BackfillPreviewModal.tsx index 3ce03ca721857..4988e99d192cf 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/BackfillPreviewModal.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/BackfillPreviewModal.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import {Box, Button, Colors, Dialog, DialogFooter, Spinner} from '@dagster-io/ui-components'; import {useVirtualizer} from '@tanstack/react-virtual'; import {useMemo, useRef} from 'react'; @@ -15,6 +14,7 @@ import { BackfillPolicyForLaunchAssetFragment, PartitionDefinitionForLaunchAssetFragment, } from './types/LaunchAssetExecutionButton.types'; +import {gql, useQuery} from '../apollo-client'; import {tokenForAssetKey} from '../asset-graph/Utils'; import {TargetPartitionsDisplay} from '../instance/backfill/TargetPartitionsDisplay'; import {useBlockTraceOnQueryResult} from '../performance/TraceContext'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/CalculateUnsyncedDialog.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/CalculateUnsyncedDialog.tsx index 4d3af7d758f4f..cba3c784edbed 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/CalculateUnsyncedDialog.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/CalculateUnsyncedDialog.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import { Box, Button, @@ -24,6 +23,7 @@ import { AssetStaleStatusQuery, AssetStaleStatusQueryVariables, } from './types/CalculateUnsyncedDialog.types'; +import {gql, useQuery} from '../apollo-client'; import {showCustomAlert} from '../app/CustomAlertProvider'; import {displayNameForAssetKey} from '../asset-graph/Utils'; import {Container, Inner, Row} from '../ui/VirtualizedTable'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/DeleteDynamicPartitionsDialog.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/DeleteDynamicPartitionsDialog.tsx index 73fe1f5f83d9e..b060d1c36f71a 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/DeleteDynamicPartitionsDialog.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/DeleteDynamicPartitionsDialog.tsx @@ -1,4 +1,3 @@ -import {RefetchQueriesFunction, gql, useMutation} from '@apollo/client'; // eslint-disable-next-line no-restricted-imports import { Body2, @@ -16,6 +15,7 @@ import { DeleteDynamicPartitionsMutationVariables, } from './types/DeleteDynamicPartitionsDialog.types'; import {usePartitionHealthData} from './usePartitionHealthData'; +import {RefetchQueriesFunction, gql, useMutation} from '../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {PythonErrorInfo} from '../app/PythonErrorInfo'; import {AssetKeyInput, PartitionDefinitionType} from '../graphql/types'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/LaunchAssetChoosePartitionsDialog.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/LaunchAssetChoosePartitionsDialog.tsx index e4131e39df565..244f10ac01227 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/LaunchAssetChoosePartitionsDialog.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/LaunchAssetChoosePartitionsDialog.tsx @@ -1,4 +1,3 @@ -import {gql, useApolloClient, useQuery} from '@apollo/client'; // eslint-disable-next-line no-restricted-imports import {Radio} from '@blueprintjs/core'; import { @@ -44,6 +43,7 @@ import { } from './types/LaunchAssetExecutionButton.types'; import {usePartitionDimensionSelections} from './usePartitionDimensionSelections'; import {PartitionDimensionSelection, usePartitionHealthData} from './usePartitionHealthData'; +import {gql, useApolloClient, useQuery} from '../apollo-client'; import {showCustomAlert} from '../app/CustomAlertProvider'; import {PipelineRunTag} from '../app/ExecutionSessionStorage'; import {usePermissionsForLocation} from '../app/Permissions'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/LaunchAssetExecutionButton.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/LaunchAssetExecutionButton.tsx index 9518163e1d496..1fdc50fc01204 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/LaunchAssetExecutionButton.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/LaunchAssetExecutionButton.tsx @@ -1,4 +1,3 @@ -import {ApolloClient, gql, useApolloClient} from '@apollo/client'; import { Box, Button, @@ -36,6 +35,7 @@ import { LaunchAssetLoaderResourceQuery, LaunchAssetLoaderResourceQueryVariables, } from './types/LaunchAssetExecutionButton.types'; +import {ApolloClient, gql, useApolloClient} from '../apollo-client'; import {CloudOSSContext} from '../app/CloudOSSContext'; import {showCustomAlert} from '../app/CustomAlertProvider'; import {useConfirmation} from '../app/CustomConfirmationProvider'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/LaunchAssetObservationButton.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/LaunchAssetObservationButton.tsx index 3ec9b3ab6a633..c25a9c3c406a4 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/LaunchAssetObservationButton.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/LaunchAssetObservationButton.tsx @@ -1,4 +1,3 @@ -import {ApolloClient, useApolloClient} from '@apollo/client'; import {Button, Icon, Spinner, Tooltip} from '@dagster-io/ui-components'; import {useContext, useState} from 'react'; @@ -16,6 +15,7 @@ import { LaunchAssetLoaderQuery, LaunchAssetLoaderQueryVariables, } from './types/LaunchAssetExecutionButton.types'; +import {ApolloClient, useApolloClient} from '../apollo-client'; import {CloudOSSContext} from '../app/CloudOSSContext'; import {showCustomAlert} from '../app/CustomAlertProvider'; import {useLaunchPadHooks} from '../launchpad/LaunchpadHooksContext'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/OverdueTag.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/OverdueTag.tsx index d79f4fbbcd4f9..b34ce82294c25 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/OverdueTag.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/OverdueTag.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import {Box, Popover, Tag, Tooltip} from '@dagster-io/ui-components'; import dayjs from 'dayjs'; import duration from 'dayjs/plugin/duration'; @@ -11,6 +10,7 @@ import { TimeSinceWithOverdueColor, } from './AssetMaterializationUpstreamData'; import {OverduePopoverQuery, OverduePopoverQueryVariables} from './types/OverdueTag.types'; +import {gql, useQuery} from '../apollo-client'; import {Timestamp} from '../app/time/Timestamp'; import {timestampToString} from '../app/time/timestampToString'; import {useAssetBaseData} from '../asset-data/AssetBaseDataProvider'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/RunningBackfillsNotice.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/RunningBackfillsNotice.tsx index ac12c9b07a82c..e89965bdd9dbd 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/RunningBackfillsNotice.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/RunningBackfillsNotice.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import {Box, Colors, Icon} from '@dagster-io/ui-components'; import {useMemo} from 'react'; import {Link} from 'react-router-dom'; @@ -7,6 +6,7 @@ import { RunningBackfillsNoticeQuery, RunningBackfillsNoticeQueryVariables, } from './types/RunningBackfillsNotice.types'; +import {gql, useQuery} from '../apollo-client'; import {tokenForAssetKey} from '../asset-graph/Utils'; import {AssetKeyInput} from '../graphql/types'; import {useBlockTraceOnQueryResult} from '../performance/TraceContext'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/UnderlyingOpsOrGraph.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/UnderlyingOpsOrGraph.tsx index c1bb5ebd8436c..eedac64b7b3f0 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/UnderlyingOpsOrGraph.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/UnderlyingOpsOrGraph.tsx @@ -1,8 +1,8 @@ -import {gql} from '@apollo/client'; import {Box, Icon} from '@dagster-io/ui-components'; import {Link} from 'react-router-dom'; import {UnderlyingOpsAssetNodeFragment} from './types/UnderlyingOpsOrGraph.types'; +import {gql} from '../apollo-client'; import {displayNameForAssetKey} from '../asset-graph/Utils'; import {RepoAddress} from '../workspace/types'; import {workspacePathFromAddress} from '../workspace/workspacePath'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/asset-checks/AssetCheckDetailModal.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/asset-checks/AssetCheckDetailModal.tsx index 8f47c8ba37f91..7fd71dd2cc5ba 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/asset-checks/AssetCheckDetailModal.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/asset-checks/AssetCheckDetailModal.tsx @@ -1,4 +1,3 @@ -import {gql} from '@apollo/client'; import { Body2, Box, @@ -12,6 +11,7 @@ import { } from '@dagster-io/ui-components'; import {useState} from 'react'; +import {gql} from '../../apollo-client'; import {MetadataEntries} from '../../metadata/MetadataEntry'; import {METADATA_ENTRY_FRAGMENT} from '../../metadata/MetadataEntryFragment'; import {MetadataEntryFragment} from '../../metadata/types/MetadataEntryFragment.types'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/asset-checks/AssetChecks.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/asset-checks/AssetChecks.tsx index 37260346cfa54..3320f835d2573 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/asset-checks/AssetChecks.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/asset-checks/AssetChecks.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import { Body2, Box, @@ -44,6 +43,7 @@ import { } from './types/AssetCheckDetailModal.types'; import {AssetChecksQuery, AssetChecksQueryVariables} from './types/AssetChecks.types'; import {assetCheckStatusDescription, getCheckIcon} from './util'; +import {gql, useQuery} from '../../apollo-client'; import {FIFTEEN_SECONDS, useQueryRefreshAtInterval} from '../../app/QueryRefresh'; import {COMMON_COLLATOR, assertUnreachable} from '../../app/Util'; import {Timestamp} from '../../app/time/Timestamp'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/asset-checks/ExecuteChecksButton.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/asset-checks/ExecuteChecksButton.tsx index 017efe2f4e93b..709b280d2aeed 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/asset-checks/ExecuteChecksButton.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/asset-checks/ExecuteChecksButton.tsx @@ -1,4 +1,3 @@ -import {gql} from '@apollo/client'; import {Button, Icon, Spinner, Tooltip} from '@dagster-io/ui-components'; import {useContext, useState} from 'react'; @@ -6,6 +5,7 @@ import { ExecuteChecksButtonAssetNodeFragment, ExecuteChecksButtonCheckFragment, } from './types/ExecuteChecksButton.types'; +import {gql} from '../../apollo-client'; import {CloudOSSContext} from '../../app/CloudOSSContext'; import {usePermissionsForLocation} from '../../app/Permissions'; import {AssetCheckCanExecuteIndividually, ExecutionParams} from '../../graphql/types'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/asset-checks/VirtualizedAssetCheckTable.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/asset-checks/VirtualizedAssetCheckTable.tsx index e05f390de1f9b..5deeea98fd499 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/asset-checks/VirtualizedAssetCheckTable.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/asset-checks/VirtualizedAssetCheckTable.tsx @@ -1,4 +1,3 @@ -import {gql} from '@apollo/client'; import {Body2, Box, Caption} from '@dagster-io/ui-components'; import {useVirtualizer} from '@tanstack/react-virtual'; import {useRef} from 'react'; @@ -10,6 +9,7 @@ import {AssetCheckStatusTag} from './AssetCheckStatusTag'; import {ExecuteChecksButton} from './ExecuteChecksButton'; import {ExecuteChecksButtonAssetNodeFragment} from './types/ExecuteChecksButton.types'; import {AssetCheckTableFragment} from './types/VirtualizedAssetCheckTable.types'; +import {gql} from '../../apollo-client'; import {linkToRunEvent} from '../../runs/RunUtils'; import {TimestampDisplay} from '../../schedules/TimestampDisplay'; import {testId} from '../../testing/testId'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/auto-materialization/AssetDaemonTicksQuery.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/auto-materialization/AssetDaemonTicksQuery.tsx index caa7b9d90117f..c82b802f94e21 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/auto-materialization/AssetDaemonTicksQuery.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/auto-materialization/AssetDaemonTicksQuery.tsx @@ -1,5 +1,4 @@ -import {gql} from '@apollo/client'; - +import {gql} from '../../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../../app/PythonErrorFragment'; export const ASSET_DAEMON_TICK_FRAGMENT = gql` diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/auto-materialization/AutomaterializationTickDetailDialog.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/auto-materialization/AutomaterializationTickDetailDialog.tsx index 5479b410c2205..d59c1c6733535 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/auto-materialization/AutomaterializationTickDetailDialog.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/auto-materialization/AutomaterializationTickDetailDialog.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import {Box, Caption, Colors, Icon, Spinner, Subtitle2} from '@dagster-io/ui-components'; import {useVirtualizer} from '@tanstack/react-virtual'; import {memo, useMemo, useRef, useState} from 'react'; @@ -10,6 +9,7 @@ import { AssetGroupAndLocationQuery, AssetGroupAndLocationQueryVariables, } from './types/AutomaterializationTickDetailDialog.types'; +import {gql, useQuery} from '../../apollo-client'; import {Timestamp} from '../../app/time/Timestamp'; import {tokenForAssetKey} from '../../asset-graph/Utils'; import {AssetKeyInput, InstigationTickStatus} from '../../graphql/types'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/auto-materialization/GlobalAutomaterializationContent.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/auto-materialization/GlobalAutomaterializationContent.tsx index 82f33ff07ba1b..48ecd3948b67f 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/auto-materialization/GlobalAutomaterializationContent.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/auto-materialization/GlobalAutomaterializationContent.tsx @@ -1,4 +1,3 @@ -import {useLazyQuery} from '@apollo/client'; import {Box, Checkbox, Colors, Spinner, Subtitle2, Table} from '@dagster-io/ui-components'; import {useCallback, useMemo, useState} from 'react'; @@ -12,6 +11,7 @@ import { AssetDaemonTicksQuery, AssetDaemonTicksQueryVariables, } from './types/AssetDaemonTicksQuery.types'; +import {useLazyQuery} from '../../apollo-client'; import {useConfirmation} from '../../app/CustomConfirmationProvider'; import {useUnscopedPermissions} from '../../app/Permissions'; import {useRefreshAtInterval} from '../../app/QueryRefresh'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/lineage/useColumnLineageDataForAssets.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/lineage/useColumnLineageDataForAssets.tsx index c7db77a475348..7747c3bc5612f 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/lineage/useColumnLineageDataForAssets.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/lineage/useColumnLineageDataForAssets.tsx @@ -1,10 +1,10 @@ -import {gql, useApolloClient} from '@apollo/client'; import React, {useMemo, useRef, useState} from 'react'; import { AssetColumnLineageQuery, AssetColumnLineageQueryVariables, } from './types/useColumnLineageDataForAssets.types'; +import {gql, useApolloClient} from '../../apollo-client'; import {toGraphId} from '../../asset-graph/Utils'; import {AssetKeyInput} from '../../graphql/types'; import {isCanonicalColumnLineageEntry} from '../../metadata/TableSchema'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/useAutomaterializeDaemonStatus.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/useAutomaterializeDaemonStatus.tsx index 8960c76fb3a6d..018dbb672944f 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/useAutomaterializeDaemonStatus.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/useAutomaterializeDaemonStatus.tsx @@ -1,4 +1,3 @@ -import {gql, useMutation, useQuery} from '@apollo/client'; import {useCallback} from 'react'; import { @@ -7,6 +6,7 @@ import { SetAutoMaterializePausedMutation, SetAutoMaterializePausedMutationVariables, } from './types/useAutomaterializeDaemonStatus.types'; +import {gql, useMutation, useQuery} from '../apollo-client'; import {useBlockTraceOnQueryResult} from '../performance/TraceContext'; export function useAutomaterializeDaemonStatus() { diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/useLatestPartitionEvents.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/useLatestPartitionEvents.tsx index 9d6214a14131e..a7b012af21488 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/useLatestPartitionEvents.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/useLatestPartitionEvents.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; // eslint-disable-next-line no-restricted-imports import React from 'react'; @@ -7,6 +6,7 @@ import { AssetOverviewMetadataEventsQuery, AssetOverviewMetadataEventsQueryVariables, } from './types/useLatestPartitionEvents.types'; +import {gql, useQuery} from '../apollo-client'; import {LiveDataForNode} from '../asset-graph/Utils'; import {usePredicateChangeSignal} from '../hooks/usePredicateChangeSignal'; import {METADATA_ENTRY_FRAGMENT} from '../metadata/MetadataEntryFragment'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/usePaginatedAssetEvents.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/usePaginatedAssetEvents.tsx index eafa0da3ce0c8..ccd8c0587bd93 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/usePaginatedAssetEvents.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/usePaginatedAssetEvents.tsx @@ -1,4 +1,3 @@ -import {useApolloClient} from '@apollo/client'; import min from 'lodash/min'; import uniq from 'lodash/uniq'; import uniqBy from 'lodash/uniqBy'; @@ -12,6 +11,7 @@ import { AssetObservationFragment, } from './types/useRecentAssetEvents.types'; import {ASSET_EVENTS_QUERY} from './useRecentAssetEvents'; +import {useApolloClient} from '../apollo-client'; import {useBlockTraceUntilTrue} from '../performance/TraceContext'; /** Note: This hook paginates through an asset's events, optionally beginning at ?asOf=. diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/usePartitionHealthData.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/usePartitionHealthData.tsx index 6ebd5eb52e8be..ba44d01218518 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/usePartitionHealthData.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/usePartitionHealthData.tsx @@ -1,4 +1,3 @@ -import {gql, useApolloClient} from '@apollo/client'; import isEqual from 'lodash/isEqual'; import keyBy from 'lodash/keyBy'; import {useEffect, useMemo, useState} from 'react'; @@ -11,6 +10,7 @@ import { PartitionHealthQuery, PartitionHealthQueryVariables, } from './types/usePartitionHealthData.types'; +import {gql, useApolloClient} from '../apollo-client'; import {assertUnreachable} from '../app/Util'; import {LiveDataForNode} from '../asset-graph/Utils'; import {PartitionDefinitionType, PartitionRangeStatus} from '../graphql/types'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/usePartitionNameForPipeline.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/usePartitionNameForPipeline.tsx index 55a2c6d080333..f7eb1349ec5f0 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/usePartitionNameForPipeline.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/usePartitionNameForPipeline.tsx @@ -1,10 +1,10 @@ -import {gql, useQuery} from '@apollo/client'; import {useMemo} from 'react'; import { AssetJobPartitionSetsQuery, AssetJobPartitionSetsQueryVariables, } from './types/usePartitionNameForPipeline.types'; +import {gql, useQuery} from '../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {useBlockTraceOnQueryResult} from '../performance/TraceContext'; import {RepoAddress} from '../workspace/types'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/useRecentAssetEvents.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/useRecentAssetEvents.tsx index f1e114d66f02b..fe2d283814f8a 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/useRecentAssetEvents.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/useRecentAssetEvents.tsx @@ -1,10 +1,10 @@ -import {gql, useQuery} from '@apollo/client'; import uniq from 'lodash/uniq'; import {useMemo} from 'react'; import {ASSET_LINEAGE_FRAGMENT} from './AssetLineageElements'; import {AssetKey, AssetViewParams} from './types'; import {AssetEventsQuery, AssetEventsQueryVariables} from './types/useRecentAssetEvents.types'; +import {gql, useQuery} from '../apollo-client'; import {METADATA_ENTRY_FRAGMENT} from '../metadata/MetadataEntryFragment'; import {useBlockTraceOnQueryResult} from '../performance/TraceContext'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/useReportEventsModal.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/useReportEventsModal.tsx index f7509cbab7a8b..0fbe0ba084205 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/useReportEventsModal.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/useReportEventsModal.tsx @@ -1,4 +1,3 @@ -import {gql, useMutation, useQuery} from '@apollo/client'; import { Body2, Box, @@ -28,6 +27,7 @@ import { } from './types/useReportEventsModal.types'; import {usePartitionDimensionSelections} from './usePartitionDimensionSelections'; import {keyCountInSelections, usePartitionHealthData} from './usePartitionHealthData'; +import {gql, useMutation, useQuery} from '../apollo-client'; import {showCustomAlert} from '../app/CustomAlertProvider'; import {showSharedToaster} from '../app/DomUtils'; import {usePermissionsForLocation} from '../app/Permissions'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/useWipeAssets.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/useWipeAssets.tsx index d9652ebebbb8b..a9cfd41ff4b82 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/useWipeAssets.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/useWipeAssets.tsx @@ -1,7 +1,7 @@ -import {RefetchQueriesFunction, gql, useMutation} from '@apollo/client'; import {useLayoutEffect, useRef, useState} from 'react'; import {AssetWipeMutation, AssetWipeMutationVariables} from './types/useWipeAssets.types'; +import {RefetchQueriesFunction, gql, useMutation} from '../apollo-client'; import {showCustomAlert} from '../app/CustomAlertProvider'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {PartitionsByAssetSelector} from '../graphql/types'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/automation/AutomationAssetSelectionFragment.tsx b/js_modules/dagster-ui/packages/ui-core/src/automation/AutomationAssetSelectionFragment.tsx index a4a8122494255..04cb71ef64348 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/automation/AutomationAssetSelectionFragment.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/automation/AutomationAssetSelectionFragment.tsx @@ -1,5 +1,4 @@ -import {gql} from '@apollo/client'; - +import {gql} from '../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; export const AUTOMATION_ASSET_SELECTION_FRAGMENT = gql` diff --git a/js_modules/dagster-ui/packages/ui-core/src/automation/AutomationStateChangeDialog.tsx b/js_modules/dagster-ui/packages/ui-core/src/automation/AutomationStateChangeDialog.tsx index 1140ff82eb34d..4bf36ccab3033 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/automation/AutomationStateChangeDialog.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/automation/AutomationStateChangeDialog.tsx @@ -1,4 +1,3 @@ -import {useMutation} from '@apollo/client'; // eslint-disable-next-line no-restricted-imports import {ProgressBar} from '@blueprintjs/core'; import { @@ -12,6 +11,7 @@ import { } from '@dagster-io/ui-components'; import {useEffect} from 'react'; +import {useMutation} from '../apollo-client'; import {assertUnreachable} from '../app/Util'; import { OpenWithIntent, diff --git a/js_modules/dagster-ui/packages/ui-core/src/automation/VirtualizedAutomationScheduleRow.tsx b/js_modules/dagster-ui/packages/ui-core/src/automation/VirtualizedAutomationScheduleRow.tsx index 7cba3cb5302e8..16b80b9d23459 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/automation/VirtualizedAutomationScheduleRow.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/automation/VirtualizedAutomationScheduleRow.tsx @@ -1,10 +1,10 @@ -import {useLazyQuery} from '@apollo/client'; import {Box, Caption, Checkbox, MiddleTruncate, Tooltip} from '@dagster-io/ui-components'; import {forwardRef, useCallback, useMemo} from 'react'; import {Link} from 'react-router-dom'; import {AutomationTargetList} from './AutomationTargetList'; import {AutomationRowGrid} from './VirtualizedAutomationRow'; +import {useLazyQuery} from '../apollo-client'; import {FIFTEEN_SECONDS, useQueryRefreshAtInterval} from '../app/QueryRefresh'; import {InstigationStatus} from '../graphql/types'; import {LastRunSummary} from '../instance/LastRunSummary'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/automation/VirtualizedAutomationSensorRow.tsx b/js_modules/dagster-ui/packages/ui-core/src/automation/VirtualizedAutomationSensorRow.tsx index dce2dc8000c9f..2a68ea50c1e7a 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/automation/VirtualizedAutomationSensorRow.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/automation/VirtualizedAutomationSensorRow.tsx @@ -1,10 +1,10 @@ -import {useLazyQuery} from '@apollo/client'; import {Box, Checkbox, MiddleTruncate, Tag, Tooltip} from '@dagster-io/ui-components'; import {forwardRef, useCallback, useMemo} from 'react'; import {Link} from 'react-router-dom'; import {AutomationTargetList} from './AutomationTargetList'; import {AutomationRowGrid} from './VirtualizedAutomationRow'; +import {useLazyQuery} from '../apollo-client'; import {FIFTEEN_SECONDS, useQueryRefreshAtInterval} from '../app/QueryRefresh'; import {InstigationStatus} from '../graphql/types'; import {LastRunSummary} from '../instance/LastRunSummary'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/code-location/CodeLocationAssetsList.tsx b/js_modules/dagster-ui/packages/ui-core/src/code-location/CodeLocationAssetsList.tsx index 47986eb16e59d..ada7289d509ea 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/code-location/CodeLocationAssetsList.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/code-location/CodeLocationAssetsList.tsx @@ -1,4 +1,3 @@ -import {useQuery} from '@apollo/client'; import { Box, Colors, @@ -14,6 +13,7 @@ import {ChangeEvent, useCallback, useMemo, useRef, useState} from 'react'; import styled from 'styled-components'; import {SearchableListRow} from './CodeLocationSearchableList'; +import {useQuery} from '../apollo-client'; import {displayNameForAssetKey} from '../asset-graph/Utils'; import {assetDetailsPathForKey} from '../assets/assetDetailsPathForKey'; import {useAssetSearch} from '../assets/useAssetSearch'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/code-location/CodeLocationGraphsList.tsx b/js_modules/dagster-ui/packages/ui-core/src/code-location/CodeLocationGraphsList.tsx index 7ae38a31c8e5b..1819ab55e6234 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/code-location/CodeLocationGraphsList.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/code-location/CodeLocationGraphsList.tsx @@ -1,8 +1,8 @@ -import {useQuery} from '@apollo/client'; import {Box, NonIdealState, SpinnerWithText} from '@dagster-io/ui-components'; import {useMemo} from 'react'; import {CodeLocationSearchableList, SearchableListRow} from './CodeLocationSearchableList'; +import {useQuery} from '../apollo-client'; import {PythonErrorInfo} from '../app/PythonErrorInfo'; import {useBlockTraceOnQueryResult} from '../performance/TraceContext'; import {WORSKPACE_GRAPHS_QUERY} from '../workspace/WorkspaceGraphsQuery'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/code-location/CodeLocationOpsView.tsx b/js_modules/dagster-ui/packages/ui-core/src/code-location/CodeLocationOpsView.tsx index 96c85d752b481..5d720dd26c8c8 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/code-location/CodeLocationOpsView.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/code-location/CodeLocationOpsView.tsx @@ -1,7 +1,7 @@ -import {useQuery} from '@apollo/client'; import {Box, NonIdealState, SpinnerWithText} from '@dagster-io/ui-components'; import {useParams} from 'react-router-dom'; +import {useQuery} from '../apollo-client'; import {PythonErrorInfo} from '../app/PythonErrorInfo'; import {OPS_ROOT_QUERY, OpsRootWithData} from '../ops/OpsRoot'; import {OpsRootQuery, OpsRootQueryVariables} from '../ops/types/OpsRoot.types'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/configeditor/ConfigEditorUtils.tsx b/js_modules/dagster-ui/packages/ui-core/src/configeditor/ConfigEditorUtils.tsx index d2ab00dc3ed41..c037f98dcdeda 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/configeditor/ConfigEditorUtils.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/configeditor/ConfigEditorUtils.tsx @@ -1,8 +1,8 @@ -import {gql} from '@apollo/client'; import {YamlModeValidationResult} from '@dagster-io/ui-components'; import yaml from 'yaml'; import {ConfigEditorValidationFragment} from './types/ConfigEditorUtils.types'; +import {gql} from '../apollo-client'; export const CONFIG_EDITOR_RUN_CONFIG_SCHEMA_FRAGMENT = gql` fragment ConfigEditorRunConfigSchemaFragment on RunConfigSchema { diff --git a/js_modules/dagster-ui/packages/ui-core/src/dagstertype/DagsterType.tsx b/js_modules/dagster-ui/packages/ui-core/src/dagstertype/DagsterType.tsx index babbcf1ede22c..1face5d8f904a 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/dagstertype/DagsterType.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/dagstertype/DagsterType.tsx @@ -1,9 +1,9 @@ -import {gql} from '@apollo/client'; import {Box, FontFamily} from '@dagster-io/ui-components'; import {Spacing} from '@dagster-io/ui-components/src/components/types'; import styled from 'styled-components'; import {DagsterTypeFragment} from './types/DagsterType.types'; +import {gql} from '../apollo-client'; import {gqlTypePredicate} from '../app/Util'; import {METADATA_ENTRY_FRAGMENT} from '../metadata/MetadataEntryFragment'; import {TableSchema} from '../metadata/TableSchema'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/gantt/RunGroupPanel.tsx b/js_modules/dagster-ui/packages/ui-core/src/gantt/RunGroupPanel.tsx index 02aa48afe96a1..9cb403a969b98 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/gantt/RunGroupPanel.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/gantt/RunGroupPanel.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import {Box, ButtonLink, Colors, FontFamily, Group, Icon} from '@dagster-io/ui-components'; import {useEffect} from 'react'; import {Link} from 'react-router-dom'; @@ -9,6 +8,7 @@ import { RunGroupPanelQueryVariables, RunGroupPanelRunFragment, } from './types/RunGroupPanel.types'; +import {gql, useQuery} from '../apollo-client'; import {showCustomAlert} from '../app/CustomAlertProvider'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {FIFTEEN_SECONDS, useQueryRefreshAtInterval} from '../app/QueryRefresh'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/gantt/toGraphQueryItems.tsx b/js_modules/dagster-ui/packages/ui-core/src/gantt/toGraphQueryItems.tsx index edf2dcafcc6c7..833f9247d58b6 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/gantt/toGraphQueryItems.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/gantt/toGraphQueryItems.tsx @@ -1,7 +1,6 @@ -import {gql} from '@apollo/client'; - import {invocationsOfPlannedDynamicStep, replacePlannedIndex} from './DynamicStepSupport'; import {ExecutionPlanToGraphFragment} from './types/toGraphQueryItems.types'; +import {gql} from '../apollo-client'; import {GraphQueryItem} from '../app/GraphQueryImpl'; import {StepKind} from '../graphql/types'; import {IStepMetadata, IStepState} from '../runs/RunMetadataProvider'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/graph/OpGraph.tsx b/js_modules/dagster-ui/packages/ui-core/src/graph/OpGraph.tsx index d9bd13ba4ab22..d1d8873008726 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/graph/OpGraph.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/graph/OpGraph.tsx @@ -1,4 +1,3 @@ -import {gql} from '@apollo/client'; import {Colors} from '@dagster-io/ui-components'; import * as React from 'react'; import styled from 'styled-components'; @@ -17,6 +16,7 @@ import { isOpHighlighted, } from './common'; import {OpGraphOpFragment} from './types/OpGraph.types'; +import {gql} from '../apollo-client'; import {OpNameOrPath} from '../ops/OpNameOrPath'; const NoOp = () => {}; diff --git a/js_modules/dagster-ui/packages/ui-core/src/graph/OpNode.tsx b/js_modules/dagster-ui/packages/ui-core/src/graph/OpNode.tsx index 7c9d45506a618..ea46ab0c28e7b 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/graph/OpNode.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/graph/OpNode.tsx @@ -1,4 +1,3 @@ -import {gql} from '@apollo/client'; import {Colors, FontFamily, Icon} from '@dagster-io/ui-components'; import * as React from 'react'; import styled from 'styled-components'; @@ -9,6 +8,7 @@ import {IOpTag, OpTags} from './OpTags'; import {OpLayout} from './asyncGraphLayout'; import {Edge, position} from './common'; import {OpNodeDefinitionFragment, OpNodeInvocationFragment} from './types/OpNode.types'; +import {gql} from '../apollo-client'; import {withMiddleTruncation} from '../app/Util'; import {displayNameForAssetKey} from '../asset-graph/Utils'; import {AssetKey} from '../assets/types'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/instance/DaemonList.tsx b/js_modules/dagster-ui/packages/ui-core/src/instance/DaemonList.tsx index e50e3de5148f3..95cc68fe4c97b 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/instance/DaemonList.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/instance/DaemonList.tsx @@ -1,8 +1,8 @@ -import {gql} from '@apollo/client'; import {Box, Checkbox, Group, Spinner, Table, Tag} from '@dagster-io/ui-components'; import {DaemonHealth} from './DaemonHealth'; import {DaemonStatusForListFragment} from './types/DaemonList.types'; +import {gql} from '../apollo-client'; import {useConfirmation} from '../app/CustomConfirmationProvider'; import {useUnscopedPermissions} from '../app/Permissions'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceBackfills.tsx b/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceBackfills.tsx index d6e8bd19b9e59..217e0eac2e932 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceBackfills.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceBackfills.tsx @@ -1,4 +1,3 @@ -import {gql} from '@apollo/client'; import { Box, Colors, @@ -12,6 +11,7 @@ import { InstanceBackfillsQuery, InstanceBackfillsQueryVariables, } from './types/InstanceBackfills.types'; +import {gql} from '../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {PythonErrorInfo} from '../app/PythonErrorInfo'; import { diff --git a/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceConcurrency.tsx b/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceConcurrency.tsx index 780894da85afa..b417ab9d9f778 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceConcurrency.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceConcurrency.tsx @@ -1,4 +1,3 @@ -import {gql, useMutation, useQuery} from '@apollo/client'; import { Box, Button, @@ -48,6 +47,7 @@ import { SetConcurrencyLimitMutation, SetConcurrencyLimitMutationVariables, } from './types/InstanceConcurrency.types'; +import {gql, useMutation, useQuery} from '../apollo-client'; import {showSharedToaster} from '../app/DomUtils'; import { FIFTEEN_SECONDS, diff --git a/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceConfig.tsx b/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceConfig.tsx index a7d1267fdd882..e26bf36bc49a7 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceConfig.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceConfig.tsx @@ -1,6 +1,5 @@ import 'codemirror/addon/search/searchcursor'; -import {gql, useQuery} from '@apollo/client'; import { Box, Code, @@ -18,6 +17,7 @@ import {createGlobalStyle} from 'styled-components'; import {InstancePageContext} from './InstancePageContext'; import {InstanceTabs} from './InstanceTabs'; import {InstanceConfigQuery, InstanceConfigQueryVariables} from './types/InstanceConfig.types'; +import {gql, useQuery} from '../apollo-client'; import { FIFTEEN_SECONDS, QueryRefreshCountdown, diff --git a/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceHealthFragment.tsx b/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceHealthFragment.tsx index 4a6db21fd3ced..a04869f3fa414 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceHealthFragment.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceHealthFragment.tsx @@ -1,6 +1,5 @@ -import {gql} from '@apollo/client'; - import {DAEMON_HEALTH_FRAGMENT} from './DaemonList'; +import {gql} from '../apollo-client'; export const INSTANCE_HEALTH_FRAGMENT = gql` fragment InstanceHealthFragment on Instance { diff --git a/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceHealthPage.tsx b/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceHealthPage.tsx index 4725ae9ff3059..7eeca82b66402 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceHealthPage.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceHealthPage.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import {Box, Colors, Heading, PageHeader, Subheading} from '@dagster-io/ui-components'; import {useContext} from 'react'; @@ -7,6 +6,7 @@ import {INSTANCE_HEALTH_FRAGMENT} from './InstanceHealthFragment'; import {InstancePageContext} from './InstancePageContext'; import {InstanceTabs} from './InstanceTabs'; import {InstanceHealthQuery, InstanceHealthQueryVariables} from './types/InstanceHealthPage.types'; +import {gql, useQuery} from '../apollo-client'; import { FIFTEEN_SECONDS, QueryRefreshCountdown, diff --git a/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceTabs.tsx b/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceTabs.tsx index 711a59114f1dd..c4fd89cc44a67 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceTabs.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceTabs.tsx @@ -1,9 +1,9 @@ -import {QueryResult} from '@apollo/client'; import {Box, Tabs} from '@dagster-io/ui-components'; import {useContext} from 'react'; import {InstancePageContext} from './InstancePageContext'; import {useCanSeeConfig} from './useCanSeeConfig'; +import {QueryResult} from '../apollo-client'; import {QueryRefreshCountdown, QueryRefreshState} from '../app/QueryRefresh'; import {InstanceWarningIcon} from '../nav/InstanceWarningIcon'; import {WorkspaceStatus} from '../nav/WorkspaceStatus'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/instance/JobMenu.tsx b/js_modules/dagster-ui/packages/ui-core/src/instance/JobMenu.tsx index da0fabc8e1e7d..78ef5e796df9f 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/instance/JobMenu.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/instance/JobMenu.tsx @@ -1,8 +1,8 @@ -import {gql, useLazyQuery} from '@apollo/client'; import {Button, Icon, Menu, MenuItem, Popover, Spinner, Tooltip} from '@dagster-io/ui-components'; import {useCallback} from 'react'; import {RunReExecutionQuery, RunReExecutionQueryVariables} from './types/JobMenu.types'; +import {gql, useLazyQuery} from '../apollo-client'; import {usePermissionsForLocation} from '../app/Permissions'; import {useMaterializationAction} from '../assets/LaunchAssetExecutionButton'; import {EXECUTION_PLAN_TO_GRAPH_FRAGMENT} from '../gantt/toGraphQueryItems'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/instance/NextTick.tsx b/js_modules/dagster-ui/packages/ui-core/src/instance/NextTick.tsx index e328e6676dfe9..761bbfc884c01 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/instance/NextTick.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/instance/NextTick.tsx @@ -1,4 +1,4 @@ -import {gql} from '@apollo/client'; +import {gql} from '../apollo-client'; export const SCHEDULE_FUTURE_TICKS_FRAGMENT = gql` fragment ScheduleFutureTicksFragment on Schedule { diff --git a/js_modules/dagster-ui/packages/ui-core/src/instance/StepSummaryForRun.tsx b/js_modules/dagster-ui/packages/ui-core/src/instance/StepSummaryForRun.tsx index 4a7dbde010e37..a3119049cd1db 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/instance/StepSummaryForRun.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/instance/StepSummaryForRun.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import {Caption, Colors} from '@dagster-io/ui-components'; import qs from 'qs'; import {useMemo} from 'react'; @@ -8,6 +7,7 @@ import { StepSummaryForRunQuery, StepSummaryForRunQueryVariables, } from './types/StepSummaryForRun.types'; +import {gql, useQuery} from '../apollo-client'; import {StepEventStatus} from '../graphql/types'; import {useBlockTraceOnQueryResult} from '../performance/TraceContext'; import {failedStatuses, inProgressStatuses} from '../runs/RunStatuses'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/instance/VirtualizedInstanceConcurrencyTable.tsx b/js_modules/dagster-ui/packages/ui-core/src/instance/VirtualizedInstanceConcurrencyTable.tsx index ec29032e66d11..5cbfcc7ff25cc 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/instance/VirtualizedInstanceConcurrencyTable.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/instance/VirtualizedInstanceConcurrencyTable.tsx @@ -1,4 +1,3 @@ -import {gql, useLazyQuery} from '@apollo/client'; import { Box, Button, @@ -17,6 +16,7 @@ import { SingleConcurrencyKeyQuery, SingleConcurrencyKeyQueryVariables, } from './types/VirtualizedInstanceConcurrencyTable.types'; +import {gql, useLazyQuery} from '../apollo-client'; import {FIFTEEN_SECONDS, useQueryRefreshAtInterval} from '../app/QueryRefresh'; import {useBlockTraceOnQueryResult} from '../performance/TraceContext'; import {Container, HeaderCell, HeaderRow, Inner, Row, RowCell} from '../ui/VirtualizedTable'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillActionsMenu.tsx b/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillActionsMenu.tsx index 4efe9d692cca4..f12d4de6515a4 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillActionsMenu.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillActionsMenu.tsx @@ -1,4 +1,3 @@ -import {gql, useMutation} from '@apollo/client'; import {Button, Group, Icon, Menu, MenuItem, Popover} from '@dagster-io/ui-components'; import {useState} from 'react'; import {useHistory} from 'react-router-dom'; @@ -15,6 +14,7 @@ import { import {RESUME_BACKFILL_MUTATION} from './BackfillUtils'; import {BackfillActionsBackfillFragment} from './types/BackfillActionsMenu.types'; import {ResumeBackfillMutation, ResumeBackfillMutationVariables} from './types/BackfillUtils.types'; +import {gql, useMutation} from '../../apollo-client'; import {showCustomAlert} from '../../app/CustomAlertProvider'; import {showSharedToaster} from '../../app/DomUtils'; import {PythonErrorInfo} from '../../app/PythonErrorInfo'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillLogsTab.tsx b/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillLogsTab.tsx index a49156ad4cad2..4b3895034e9d2 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillLogsTab.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillLogsTab.tsx @@ -1,9 +1,9 @@ -import {gql} from '@apollo/client'; import {Box, NonIdealState, Spinner} from '@dagster-io/ui-components'; import React, {useMemo} from 'react'; import {BackfillLogsPageQuery, BackfillLogsPageQueryVariables} from './types/BackfillLogsTab.types'; import {BackfillDetailsBackfillFragment} from './types/BackfillPage.types'; +import {gql} from '../../apollo-client'; import {QueryRefreshCountdown} from '../../app/QueryRefresh'; import {useCursorAccumulatedQuery} from '../../runs/useCursorAccumulatedQuery'; import { diff --git a/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillPage.tsx b/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillPage.tsx index cc9720636f06a..d98a372e24c48 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillPage.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillPage.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import { Alert, Box, @@ -27,6 +26,7 @@ import { BackfillStatusesByAssetQuery, BackfillStatusesByAssetQueryVariables, } from './types/BackfillPage.types'; +import {gql, useQuery} from '../../apollo-client'; import {CloudOSSContext} from '../../app/CloudOSSContext'; import {PYTHON_ERROR_FRAGMENT} from '../../app/PythonErrorFragment'; import {PythonErrorInfo} from '../../app/PythonErrorInfo'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillPartitionsTab.tsx b/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillPartitionsTab.tsx index c07de67a130dc..d24f2422aca9c 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillPartitionsTab.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillPartitionsTab.tsx @@ -1,4 +1,3 @@ -import {gql, useApolloClient} from '@apollo/client'; import { Box, ButtonLink, @@ -13,6 +12,7 @@ import {Link, useHistory} from 'react-router-dom'; import styled from 'styled-components'; import {BackfillDetailsBackfillFragment} from './types/BackfillPage.types'; +import {gql, useApolloClient} from '../../apollo-client'; import {displayNameForAssetKey, tokenForAssetKey} from '../../asset-graph/Utils'; import {asAssetKeyInput} from '../../assets/asInput'; import {assetDetailsPathForKey} from '../../assets/assetDetailsPathForKey'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillRow.tsx b/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillRow.tsx index 7767b617d16c7..69c46e3cff195 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillRow.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillRow.tsx @@ -1,4 +1,3 @@ -import {QueryResult, gql, useLazyQuery} from '@apollo/client'; import {Box, Colors, Icon, Mono, Tag} from '@dagster-io/ui-components'; import * as React from 'react'; import {Link} from 'react-router-dom'; @@ -8,6 +7,7 @@ import {BackfillActionsMenu, backfillCanCancelRuns} from './BackfillActionsMenu' import {BackfillStatusTagForPage} from './BackfillStatusTagForPage'; import {SingleBackfillQuery, SingleBackfillQueryVariables} from './types/BackfillRow.types'; import {BackfillTableFragment} from './types/BackfillTable.types'; +import {QueryResult, gql, useLazyQuery} from '../../apollo-client'; import {FIFTEEN_SECONDS, useQueryRefreshAtInterval} from '../../app/QueryRefresh'; import {isHiddenAssetGroupJob} from '../../asset-graph/Utils'; import {RunStatus} from '../../graphql/types'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillStepStatusDialog.tsx b/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillStepStatusDialog.tsx index 8721bb87b5379..bc014ef35d6a7 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillStepStatusDialog.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillStepStatusDialog.tsx @@ -1,8 +1,8 @@ -import {gql} from '@apollo/client'; import {Button, Dialog, DialogFooter} from '@dagster-io/ui-components'; import {useMemo, useState} from 'react'; import {BackfillStepStatusDialogBackfillFragment} from './types/BackfillStepStatusDialog.types'; +import {gql} from '../../apollo-client'; import {PartitionPerOpStatus} from '../../partitions/PartitionStepStatus'; import {usePartitionStepQuery} from '../../partitions/usePartitionStepQuery'; import {DagsterTag} from '../../runs/RunTag'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillTable.tsx b/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillTable.tsx index 7d4c22b82f0c0..75a0a26da518f 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillTable.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillTable.tsx @@ -1,4 +1,3 @@ -import {gql} from '@apollo/client'; import {Table} from '@dagster-io/ui-components'; import {useState} from 'react'; @@ -6,6 +5,7 @@ import {BACKFILL_ACTIONS_BACKFILL_FRAGMENT} from './BackfillActionsMenu'; import {BackfillPartitionsRequestedDialog} from './BackfillPartitionsRequestedDialog'; import {BackfillRow} from './BackfillRow'; import {BackfillTableFragment} from './types/BackfillTable.types'; +import {gql} from '../../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../../app/PythonErrorFragment'; export const BackfillTable = ({ diff --git a/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillTerminationDialog.tsx b/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillTerminationDialog.tsx index 8781af40b9559..8a50156f79cfd 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillTerminationDialog.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillTerminationDialog.tsx @@ -1,4 +1,3 @@ -import {gql, useMutation, useQuery} from '@apollo/client'; import {Button, Dialog, DialogBody, DialogFooter} from '@dagster-io/ui-components'; import {useMemo, useState} from 'react'; @@ -9,6 +8,7 @@ import { CancelBackfillMutation, CancelBackfillMutationVariables, } from './types/BackfillTerminationDialog.types'; +import {gql, useMutation, useQuery} from '../../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../../app/PythonErrorFragment'; import {BulkActionStatus} from '../../graphql/types'; import {TerminationDialog} from '../../runs/TerminationDialog'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillUtils.tsx b/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillUtils.tsx index 8fcdf516ffc5d..f23fcb8a6ec8a 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillUtils.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/instance/backfill/BackfillUtils.tsx @@ -1,5 +1,4 @@ -import {gql} from '@apollo/client'; - +import {gql} from '../../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../../app/PythonErrorFragment'; export const RESUME_BACKFILL_MUTATION = gql` diff --git a/js_modules/dagster-ui/packages/ui-core/src/instance/useCanSeeConfig.tsx b/js_modules/dagster-ui/packages/ui-core/src/instance/useCanSeeConfig.tsx index f7d432c438b5a..ec34f51571818 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/instance/useCanSeeConfig.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/instance/useCanSeeConfig.tsx @@ -1,9 +1,8 @@ -import {gql, useQuery} from '@apollo/client'; - import { InstanceConfigHasInfoQuery, InstanceConfigHasInfoQueryVariables, } from './types/useCanSeeConfig.types'; +import {gql, useQuery} from '../apollo-client'; import {useBlockTraceOnQueryResult} from '../performance/TraceContext'; export const useCanSeeConfig = () => { diff --git a/js_modules/dagster-ui/packages/ui-core/src/instance/useDaemonStatus.tsx b/js_modules/dagster-ui/packages/ui-core/src/instance/useDaemonStatus.tsx index f6a1bdb983a15..31abb7a64876b 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/instance/useDaemonStatus.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/instance/useDaemonStatus.tsx @@ -1,9 +1,9 @@ -import {gql, useQuery} from '@apollo/client'; import {useMemo} from 'react'; import {StatusAndMessage} from './DeploymentStatusType'; import {INSTANCE_HEALTH_FRAGMENT} from './InstanceHealthFragment'; import {InstanceWarningQuery, InstanceWarningQueryVariables} from './types/useDaemonStatus.types'; +import {gql, useQuery} from '../apollo-client'; import {FIFTEEN_SECONDS, useQueryRefreshAtInterval} from '../app/QueryRefresh'; import {InstigationStatus} from '../graphql/types'; import {useRepositoryOptions} from '../workspace/WorkspaceContext'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/instance/useRunQueueConfig.tsx b/js_modules/dagster-ui/packages/ui-core/src/instance/useRunQueueConfig.tsx index 4aa6f12ca8aae..ddb4678df6291 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/instance/useRunQueueConfig.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/instance/useRunQueueConfig.tsx @@ -1,9 +1,8 @@ -import {gql, useQuery} from '@apollo/client'; - import { InstanceRunQueueConfigQuery, InstanceRunQueueConfigQueryVariables, } from './types/useRunQueueConfig.types'; +import {gql, useQuery} from '../apollo-client'; import {useBlockTraceOnQueryResult} from '../performance/TraceContext'; export const useRunQueueConfig = () => { diff --git a/js_modules/dagster-ui/packages/ui-core/src/instigation/InstigationStateBaseFragment.tsx b/js_modules/dagster-ui/packages/ui-core/src/instigation/InstigationStateBaseFragment.tsx index b260050fe5ea8..0abdb05185039 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/instigation/InstigationStateBaseFragment.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/instigation/InstigationStateBaseFragment.tsx @@ -1,4 +1,4 @@ -import {gql} from '@apollo/client'; +import {gql} from '../apollo-client'; export const INSTIGATION_STATE_BASE_FRAGMENT = gql` fragment InstigationStateBaseFragment on InstigationState { diff --git a/js_modules/dagster-ui/packages/ui-core/src/instigation/InstigationTick.tsx b/js_modules/dagster-ui/packages/ui-core/src/instigation/InstigationTick.tsx index 2cd91f8bd15f5..fb8c76720946e 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/instigation/InstigationTick.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/instigation/InstigationTick.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import { Body, Box, @@ -11,6 +10,7 @@ import { } from '@dagster-io/ui-components'; import {LaunchedRunListQuery, LaunchedRunListQueryVariables} from './types/InstigationTick.types'; +import {gql, useQuery} from '../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {useBlockTraceOnQueryResult} from '../performance/TraceContext'; import {RunTable} from '../runs/RunTable'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/instigation/InstigationUtils.tsx b/js_modules/dagster-ui/packages/ui-core/src/instigation/InstigationUtils.tsx index 989742a6d413e..0208e5a6d054c 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/instigation/InstigationUtils.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/instigation/InstigationUtils.tsx @@ -1,10 +1,10 @@ -import {gql} from '@apollo/client'; import {Colors, Group, Mono} from '@dagster-io/ui-components'; import {Link} from 'react-router-dom'; import styled from 'styled-components'; import {TICK_TAG_FRAGMENT} from './InstigationTick'; import {InstigationStateFragment, RunStatusFragment} from './types/InstigationUtils.types'; +import {gql} from '../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {LastRunSummary} from '../instance/LastRunSummary'; import {RunStatusIndicator} from '../runs/RunStatusDots'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/instigation/TickDetailsDialog.tsx b/js_modules/dagster-ui/packages/ui-core/src/instigation/TickDetailsDialog.tsx index cf0ee8b8e6183..b474d8a1d0301 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/instigation/TickDetailsDialog.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/instigation/TickDetailsDialog.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import 'chartjs-adapter-date-fns'; import { Box, @@ -21,6 +20,7 @@ import {RunList, TargetedRunList} from './InstigationTick'; import {HISTORY_TICK_FRAGMENT} from './InstigationUtils'; import {HistoryTickFragment} from './types/InstigationUtils.types'; import {SelectedTickQuery, SelectedTickQueryVariables} from './types/TickDetailsDialog.types'; +import {gql, useQuery} from '../apollo-client'; import {showCustomAlert} from '../app/CustomAlertProvider'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {PythonErrorInfo} from '../app/PythonErrorInfo'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/instigation/TickHistory.tsx b/js_modules/dagster-ui/packages/ui-core/src/instigation/TickHistory.tsx index d1ebcff816bc4..0a4817803ab51 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/instigation/TickHistory.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/instigation/TickHistory.tsx @@ -1,6 +1,5 @@ import 'chartjs-adapter-date-fns'; -import {gql, useQuery} from '@apollo/client'; import { Box, Button, @@ -32,6 +31,7 @@ import {TickDetailsDialog} from './TickDetailsDialog'; import {HistoryTickFragment} from './types/InstigationUtils.types'; import {TickHistoryQuery, TickHistoryQueryVariables} from './types/TickHistory.types'; import {countPartitionsAddedOrDeleted, isStuckStartedTick, truncate} from './util'; +import {gql, useQuery} from '../apollo-client'; import {showSharedToaster} from '../app/DomUtils'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {PythonErrorInfo} from '../app/PythonErrorInfo'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/jobs/JobsPageContent.tsx b/js_modules/dagster-ui/packages/ui-core/src/jobs/JobsPageContent.tsx index be4f15ceca3bc..f3d08534c8a9b 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/jobs/JobsPageContent.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/jobs/JobsPageContent.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import { Box, Colors, @@ -10,6 +9,7 @@ import { import {useContext, useMemo} from 'react'; import {OverviewJobsQuery, OverviewJobsQueryVariables} from './types/JobsPageContent.types'; +import {gql, useQuery} from '../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import { FIFTEEN_SECONDS, diff --git a/js_modules/dagster-ui/packages/ui-core/src/launchpad/ConfigEditorConfigPicker.tsx b/js_modules/dagster-ui/packages/ui-core/src/launchpad/ConfigEditorConfigPicker.tsx index 58f964cf3c6bd..cf3d3ad4f0e56 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/launchpad/ConfigEditorConfigPicker.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/launchpad/ConfigEditorConfigPicker.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; // eslint-disable-next-line no-restricted-imports import {HTMLInputProps, InputGroupProps2, Intent} from '@blueprintjs/core'; import { @@ -26,6 +25,7 @@ import { ConfigPartitionsQueryVariables, PartitionSetForConfigEditorFragment, } from './types/ConfigEditorConfigPicker.types'; +import {gql, useQuery} from '../apollo-client'; import {AppContext} from '../app/AppContext'; import {showCustomAlert} from '../app/CustomAlertProvider'; import {IExecutionSession} from '../app/ExecutionSessionStorage'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/launchpad/ConfigFetch.tsx b/js_modules/dagster-ui/packages/ui-core/src/launchpad/ConfigFetch.tsx index 5dee4a82ff419..4969309d5634b 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/launchpad/ConfigFetch.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/launchpad/ConfigFetch.tsx @@ -1,11 +1,10 @@ -import {ApolloClient, gql} from '@apollo/client'; - import { ConfigPartitionForAssetJobQuery, ConfigPartitionForAssetJobQueryVariables, ConfigPartitionSelectionQuery, ConfigPartitionSelectionQueryVariables, } from './types/ConfigFetch.types'; +import {ApolloClient, gql} from '../apollo-client'; import {showCustomAlert} from '../app/CustomAlertProvider'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {PythonErrorInfo} from '../app/PythonErrorInfo'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/launchpad/LaunchpadAllowedRoot.tsx b/js_modules/dagster-ui/packages/ui-core/src/launchpad/LaunchpadAllowedRoot.tsx index 193973d5bcf79..d1268d886966a 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/launchpad/LaunchpadAllowedRoot.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/launchpad/LaunchpadAllowedRoot.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import {useMemo} from 'react'; import * as yaml from 'yaml'; @@ -11,6 +10,7 @@ import {LaunchpadSessionLoading} from './LaunchpadSessionLoading'; import {LaunchpadTransientSessionContainer} from './LaunchpadTransientSessionContainer'; import {LaunchpadType} from './types'; import {LaunchpadRootQuery, LaunchpadRootQueryVariables} from './types/LaunchpadAllowedRoot.types'; +import {gql, useQuery} from '../apollo-client'; import {IExecutionSession} from '../app/ExecutionSessionStorage'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {useTrackPageView} from '../app/analytics'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/launchpad/LaunchpadSession.tsx b/js_modules/dagster-ui/packages/ui-core/src/launchpad/LaunchpadSession.tsx index 341b6c5a81bbc..d952aec8df1b1 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/launchpad/LaunchpadSession.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/launchpad/LaunchpadSession.tsx @@ -1,4 +1,3 @@ -import {gql, useApolloClient, useQuery} from '@apollo/client'; import { Body, Box, @@ -48,6 +47,7 @@ import { PreviewConfigQueryVariables, } from './types/LaunchpadSession.types'; import {mergeYaml, sanitizeConfigYamlString} from './yamlUtils'; +import {gql, useApolloClient, useQuery} from '../apollo-client'; import {showCustomAlert} from '../app/CustomAlertProvider'; import { IExecutionSession, diff --git a/js_modules/dagster-ui/packages/ui-core/src/launchpad/LaunchpadSetupFromRunRoot.tsx b/js_modules/dagster-ui/packages/ui-core/src/launchpad/LaunchpadSetupFromRunRoot.tsx index 361b9df86f853..cdaee0ba238f6 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/launchpad/LaunchpadSetupFromRunRoot.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/launchpad/LaunchpadSetupFromRunRoot.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import {Redirect, useParams} from 'react-router-dom'; import {LaunchpadSessionError} from './LaunchpadSessionError'; @@ -7,6 +6,7 @@ import { ConfigForRunQuery, ConfigForRunQueryVariables, } from './types/LaunchpadSetupFromRunRoot.types'; +import {gql, useQuery} from '../apollo-client'; import { IExecutionSession, applyCreateSession, diff --git a/js_modules/dagster-ui/packages/ui-core/src/launchpad/OpSelector.tsx b/js_modules/dagster-ui/packages/ui-core/src/launchpad/OpSelector.tsx index 352638da228ea..9ca06d4483464 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/launchpad/OpSelector.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/launchpad/OpSelector.tsx @@ -1,9 +1,9 @@ -import {gql, useQuery} from '@apollo/client'; import {Box, Colors, Popover} from '@dagster-io/ui-components'; import {useRef, useState} from 'react'; import styled from 'styled-components'; import {OpSelectorQuery, OpSelectorQueryVariables} from './types/OpSelector.types'; +import {gql, useQuery} from '../apollo-client'; import {filterByQuery} from '../app/GraphQueryImpl'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {ShortcutHandler} from '../app/ShortcutHandler'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/launchpad/RunPreview.tsx b/js_modules/dagster-ui/packages/ui-core/src/launchpad/RunPreview.tsx index c5c761dc5b55d..e8563897e3da5 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/launchpad/RunPreview.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/launchpad/RunPreview.tsx @@ -1,4 +1,3 @@ -import {gql} from '@apollo/client'; // eslint-disable-next-line no-restricted-imports import {Intent} from '@blueprintjs/core'; import { @@ -22,6 +21,7 @@ import { RunPreviewValidationErrorsFragment, RunPreviewValidationFragment, } from './types/RunPreview.types'; +import {gql} from '../apollo-client'; import {showCustomAlert} from '../app/CustomAlertProvider'; import {useConfirmation} from '../app/CustomConfirmationProvider'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/launchpad/useLaunchWithTelemetry.ts b/js_modules/dagster-ui/packages/ui-core/src/launchpad/useLaunchWithTelemetry.ts index e3dbe4497af92..0197c35c7ff97 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/launchpad/useLaunchWithTelemetry.ts +++ b/js_modules/dagster-ui/packages/ui-core/src/launchpad/useLaunchWithTelemetry.ts @@ -1,8 +1,8 @@ -import {useMutation} from '@apollo/client'; import {useCallback} from 'react'; import {useHistory} from 'react-router-dom'; import {showLaunchError} from './showLaunchError'; +import {useMutation} from '../apollo-client'; import {TelemetryAction, useTelemetryAction} from '../app/Telemetry'; import { LAUNCH_PIPELINE_EXECUTION_MUTATION, diff --git a/js_modules/dagster-ui/packages/ui-core/src/metadata/MetadataEntryFragment.tsx b/js_modules/dagster-ui/packages/ui-core/src/metadata/MetadataEntryFragment.tsx index fc6e31d24f372..9fdac47707ceb 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/metadata/MetadataEntryFragment.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/metadata/MetadataEntryFragment.tsx @@ -1,6 +1,5 @@ -import {gql} from '@apollo/client'; - import {TABLE_SCHEMA_FRAGMENT} from './TableSchemaFragment'; +import {gql} from '../apollo-client'; export const METADATA_ENTRY_FRAGMENT = gql` fragment MetadataEntryFragment on MetadataEntry { diff --git a/js_modules/dagster-ui/packages/ui-core/src/metadata/TableSchemaFragment.tsx b/js_modules/dagster-ui/packages/ui-core/src/metadata/TableSchemaFragment.tsx index cffe79dd7a5fe..7a414e1be20b8 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/metadata/TableSchemaFragment.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/metadata/TableSchemaFragment.tsx @@ -1,4 +1,4 @@ -import {gql} from '@apollo/client'; +import {gql} from '../apollo-client'; export const TABLE_SCHEMA_FRAGMENT = gql` fragment TableSchemaFragment on TableSchema { diff --git a/js_modules/dagster-ui/packages/ui-core/src/nav/JobMetadata.tsx b/js_modules/dagster-ui/packages/ui-core/src/nav/JobMetadata.tsx index 1a68ac3c22911..48cea18af4555 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/nav/JobMetadata.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/nav/JobMetadata.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import { Box, Button, @@ -21,6 +20,7 @@ import { JobMetadataQueryVariables, RunMetadataFragment, } from './types/JobMetadata.types'; +import {gql, useQuery} from '../apollo-client'; import {tokenForAssetKey} from '../asset-graph/Utils'; import {AutomaterializeDaemonStatusTag} from '../assets/AutomaterializeDaemonStatusTag'; import {useBlockTraceOnQueryResult} from '../performance/TraceContext'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/nav/LatestRunTag.tsx b/js_modules/dagster-ui/packages/ui-core/src/nav/LatestRunTag.tsx index e48cf636ff457..4822bbd5dbc13 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/nav/LatestRunTag.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/nav/LatestRunTag.tsx @@ -1,9 +1,9 @@ -import {gql, useQuery} from '@apollo/client'; import {Box, Colors, StyledTable, Tag, Tooltip} from '@dagster-io/ui-components'; import {useMemo} from 'react'; import {Link} from 'react-router-dom'; import {LatestRunTagQuery, LatestRunTagQueryVariables} from './types/LatestRunTag.types'; +import {gql, useQuery} from '../apollo-client'; import {FIFTEEN_SECONDS, useQueryRefreshAtInterval} from '../app/QueryRefresh'; import {RunStatus} from '../graphql/types'; import {useBlockTraceOnQueryResult} from '../performance/TraceContext'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/nav/LeftNavItem.tsx b/js_modules/dagster-ui/packages/ui-core/src/nav/LeftNavItem.tsx index 8362587a7c72b..b43a14bed36f4 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/nav/LeftNavItem.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/nav/LeftNavItem.tsx @@ -1,4 +1,3 @@ -import {gql, useFragment, useQuery} from '@apollo/client'; import {Colors, Icon, Tooltip} from '@dagster-io/ui-components'; import * as React from 'react'; import {useEffect, useMemo, useState} from 'react'; @@ -9,6 +8,7 @@ import {LeftNavItemType} from './LeftNavItemType'; import {Item} from './RepositoryContentList'; import {ScheduleAndSensorDialog} from './ScheduleAndSensorDialog'; import {InstigationStatesQuery, InstigationStatesQueryVariables} from './types/LeftNavItem.types'; +import {gql, useFragment, useQuery} from '../apollo-client'; import {InstigationStatus} from '../graphql/types'; import {INSTIGATION_STATE_BASE_FRAGMENT} from '../instigation/InstigationStateBaseFragment'; import {InstigationStateFragment} from '../instigation/types/InstigationUtils.types'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/nav/RepositoryLocationStateObserver.tsx b/js_modules/dagster-ui/packages/ui-core/src/nav/RepositoryLocationStateObserver.tsx index b32afc320eaca..1a6f4a4b30478 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/nav/RepositoryLocationStateObserver.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/nav/RepositoryLocationStateObserver.tsx @@ -1,4 +1,3 @@ -import {gql, useApolloClient, useSubscription} from '@apollo/client'; import {ButtonLink, Caption, Colors, Group, Icon} from '@dagster-io/ui-components'; import {useContext, useState} from 'react'; @@ -6,6 +5,7 @@ import { LocationStateChangeSubscription, LocationStateChangeSubscriptionVariables, } from './types/RepositoryLocationStateObserver.types'; +import {gql, useApolloClient, useSubscription} from '../apollo-client'; import {LocationStateChangeEventType} from '../graphql/types'; import {WorkspaceContext} from '../workspace/WorkspaceContext'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/nav/VersionNumber.tsx b/js_modules/dagster-ui/packages/ui-core/src/nav/VersionNumber.tsx index 03157e96f73cf..0e95db40c2a19 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/nav/VersionNumber.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/nav/VersionNumber.tsx @@ -1,7 +1,7 @@ -import {gql, useQuery} from '@apollo/client'; import styled from 'styled-components'; import {VersionNumberQuery, VersionNumberQueryVariables} from './types/VersionNumber.types'; +import {gql, useQuery} from '../apollo-client'; export const VersionNumber = () => { const {data} = useQuery(VERSION_NUMBER_QUERY); diff --git a/js_modules/dagster-ui/packages/ui-core/src/nav/useRepositoryLocationReload.tsx b/js_modules/dagster-ui/packages/ui-core/src/nav/useRepositoryLocationReload.tsx index 7993cd82c19be..873b828b30e4a 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/nav/useRepositoryLocationReload.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/nav/useRepositoryLocationReload.tsx @@ -1,4 +1,3 @@ -import {ApolloClient, ApolloError, gql, useApolloClient, useQuery} from '@apollo/client'; // eslint-disable-next-line no-restricted-imports import {Intent} from '@blueprintjs/core'; import {useCallback, useMemo, useReducer} from 'react'; @@ -11,6 +10,7 @@ import { RepositoryLocationStatusQuery, RepositoryLocationStatusQueryVariables, } from './types/useRepositoryLocationReload.types'; +import {ApolloClient, ApolloError, gql, useApolloClient, useQuery} from '../apollo-client'; import {showSharedToaster} from '../app/DomUtils'; import {useInvalidateConfigsForRepo} from '../app/ExecutionSessionStorage'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/ops/OpCard.tsx b/js_modules/dagster-ui/packages/ui-core/src/ops/OpCard.tsx index dcdb82bbcd70e..0da173777ce1d 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/ops/OpCard.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/ops/OpCard.tsx @@ -1,8 +1,8 @@ -import {gql} from '@apollo/client'; import {Box} from '@dagster-io/ui-components'; import styled from 'styled-components'; import {OpCardSolidDefinitionFragment} from './types/OpCard.types'; +import {gql} from '../apollo-client'; import {OP_NODE_DEFINITION_FRAGMENT, OpNode} from '../graph/OpNode'; import {layoutOp} from '../graph/asyncGraphLayout'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/ops/OpDetailsRoot.tsx b/js_modules/dagster-ui/packages/ui-core/src/ops/OpDetailsRoot.tsx index 4acfd3a0e8193..27faf66054e2a 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/ops/OpDetailsRoot.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/ops/OpDetailsRoot.tsx @@ -1,8 +1,8 @@ -import {gql, useQuery} from '@apollo/client'; import styled from 'styled-components'; import {OP_CARD_SOLID_DEFINITION_FRAGMENT, OpCard} from './OpCard'; import {UsedSolidDetailsQuery, UsedSolidDetailsQueryVariables} from './types/OpDetailsRoot.types'; +import {gql, useQuery} from '../apollo-client'; import {useBlockTraceOnQueryResult} from '../performance/TraceContext'; import { SIDEBAR_OP_DEFINITION_FRAGMENT, diff --git a/js_modules/dagster-ui/packages/ui-core/src/ops/OpTypeSignature.tsx b/js_modules/dagster-ui/packages/ui-core/src/ops/OpTypeSignature.tsx index 6dfddf90b005a..25b26486570d2 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/ops/OpTypeSignature.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/ops/OpTypeSignature.tsx @@ -1,8 +1,8 @@ -import {gql} from '@apollo/client'; import {Code} from '@dagster-io/ui-components'; import styled from 'styled-components'; import {OpTypeSignatureFragment} from './types/OpTypeSignature.types'; +import {gql} from '../apollo-client'; import {breakOnUnderscores} from '../app/Util'; import {DAGSTER_TYPE_WITH_TOOLTIP_FRAGMENT, TypeWithTooltip} from '../typeexplorer/TypeWithTooltip'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/ops/OpsRoot.tsx b/js_modules/dagster-ui/packages/ui-core/src/ops/OpsRoot.tsx index dfebc3999380a..0fe9fab6642fb 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/ops/OpsRoot.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/ops/OpsRoot.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import { Box, Colors, @@ -21,6 +20,7 @@ import styled from 'styled-components'; import {OpDetailScrollContainer, UsedSolidDetails} from './OpDetailsRoot'; import {OP_TYPE_SIGNATURE_FRAGMENT} from './OpTypeSignature'; import {OpsRootQuery, OpsRootQueryVariables, OpsRootUsedSolidFragment} from './types/OpsRoot.types'; +import {gql, useQuery} from '../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {COMMON_COLLATOR} from '../app/Util'; import {useTrackPageView} from '../app/analytics'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/overview/BasicInstigationStateFragment.tsx b/js_modules/dagster-ui/packages/ui-core/src/overview/BasicInstigationStateFragment.tsx index cd77ebf1bea3d..33e24b69651c0 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/overview/BasicInstigationStateFragment.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/overview/BasicInstigationStateFragment.tsx @@ -1,4 +1,4 @@ -import {gql} from '@apollo/client'; +import {gql} from '../apollo-client'; export const BASIC_INSTIGATION_STATE_FRAGMENT = gql` fragment BasicInstigationStateFragment on InstigationState { diff --git a/js_modules/dagster-ui/packages/ui-core/src/overview/OverviewResourcesRoot.tsx b/js_modules/dagster-ui/packages/ui-core/src/overview/OverviewResourcesRoot.tsx index bf35b25be89cb..6cc3422f4a7a7 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/overview/OverviewResourcesRoot.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/overview/OverviewResourcesRoot.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import {Box, Colors, NonIdealState, Spinner, TextInput} from '@dagster-io/ui-components'; import {useContext, useMemo} from 'react'; @@ -10,6 +9,7 @@ import { OverviewResourcesQueryVariables, } from './types/OverviewResourcesRoot.types'; import {visibleRepoKeys} from './visibleRepoKeys'; +import {gql, useQuery} from '../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {FIFTEEN_SECONDS, useQueryRefreshAtInterval} from '../app/QueryRefresh'; import {useTrackPageView} from '../app/analytics'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/overview/OverviewSchedules.tsx b/js_modules/dagster-ui/packages/ui-core/src/overview/OverviewSchedules.tsx index d0fb31fe6409c..950c853b01659 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/overview/OverviewSchedules.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/overview/OverviewSchedules.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import {Box, Colors, NonIdealState, Spinner, TextInput, Tooltip} from '@dagster-io/ui-components'; import {useContext, useMemo} from 'react'; @@ -11,6 +10,7 @@ import { OverviewSchedulesQueryVariables, } from './types/OverviewSchedules.types'; import {visibleRepoKeys} from './visibleRepoKeys'; +import {gql, useQuery} from '../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {FIFTEEN_SECONDS, useQueryRefreshAtInterval} from '../app/QueryRefresh'; import {useQueryPersistedState} from '../hooks/useQueryPersistedState'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/overview/OverviewSensors.tsx b/js_modules/dagster-ui/packages/ui-core/src/overview/OverviewSensors.tsx index 8d758e48b4ffd..654a9b4e6ef9b 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/overview/OverviewSensors.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/overview/OverviewSensors.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import {Box, Colors, NonIdealState, Spinner, TextInput, Tooltip} from '@dagster-io/ui-components'; import {useContext, useMemo} from 'react'; @@ -7,6 +6,7 @@ import {OverviewSensorTable} from './OverviewSensorsTable'; import {sortRepoBuckets} from './sortRepoBuckets'; import {OverviewSensorsQuery, OverviewSensorsQueryVariables} from './types/OverviewSensors.types'; import {visibleRepoKeys} from './visibleRepoKeys'; +import {gql, useQuery} from '../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import { FIFTEEN_SECONDS, diff --git a/js_modules/dagster-ui/packages/ui-core/src/overview/OverviewTabs.tsx b/js_modules/dagster-ui/packages/ui-core/src/overview/OverviewTabs.tsx index af6151b00e8aa..a3984096fcd5a 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/overview/OverviewTabs.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/overview/OverviewTabs.tsx @@ -1,7 +1,7 @@ -import {QueryResult} from '@apollo/client'; import {Box, Colors, Spinner, Tabs} from '@dagster-io/ui-components'; import {useContext} from 'react'; +import {QueryResult} from '../apollo-client'; import {useFeatureFlags} from '../app/Flags'; import {QueryRefreshCountdown, RefreshState} from '../app/QueryRefresh'; import {AssetFeatureContext} from '../assets/AssetFeatureContext'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/partitions/BackfillMessaging.tsx b/js_modules/dagster-ui/packages/ui-core/src/partitions/BackfillMessaging.tsx index 6f5b99ee7204b..b3471dadf36c1 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/partitions/BackfillMessaging.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/partitions/BackfillMessaging.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import {Alert, ButtonLink, Colors, Group, Mono} from '@dagster-io/ui-components'; import {History} from 'history'; import * as React from 'react'; @@ -9,6 +8,7 @@ import { DaemonNotRunningAlertQueryVariables, UsingDefaultLauncherAlertInstanceFragment, } from './types/BackfillMessaging.types'; +import {gql, useQuery} from '../apollo-client'; import {showCustomAlert} from '../app/CustomAlertProvider'; import {showSharedToaster} from '../app/DomUtils'; import {PythonErrorInfo} from '../app/PythonErrorInfo'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/partitions/BackfillSelector.tsx b/js_modules/dagster-ui/packages/ui-core/src/partitions/BackfillSelector.tsx index 3cb20c9c8441f..181f9eb8b7eb6 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/partitions/BackfillSelector.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/partitions/BackfillSelector.tsx @@ -1,4 +1,3 @@ -import {gql, useMutation, useQuery} from '@apollo/client'; import { Body2, Box, @@ -31,6 +30,7 @@ import { BackfillSelectorQuery, BackfillSelectorQueryVariables, } from './types/BackfillSelector.types'; +import {gql, useMutation, useQuery} from '../apollo-client'; import {PipelineRunTag} from '../app/ExecutionSessionStorage'; import {filterByQuery} from '../app/GraphQueryImpl'; import {isTimeseriesPartition} from '../assets/MultipartitioningSupport'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/partitions/CreatePartitionDialog.tsx b/js_modules/dagster-ui/packages/ui-core/src/partitions/CreatePartitionDialog.tsx index 6645fd89ad8f0..d7cfa32ca0790 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/partitions/CreatePartitionDialog.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/partitions/CreatePartitionDialog.tsx @@ -1,4 +1,3 @@ -import {gql, useMutation} from '@apollo/client'; import { Box, Button, @@ -19,6 +18,7 @@ import { AddDynamicPartitionMutation, AddDynamicPartitionMutationVariables, } from './types/CreatePartitionDialog.types'; +import {gql, useMutation} from '../apollo-client'; import {showCustomAlert} from '../app/CustomAlertProvider'; import {PythonErrorInfo} from '../app/PythonErrorInfo'; import {invalidatePartitions} from '../assets/PartitionSubscribers'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/partitions/JobBackfillsTable.tsx b/js_modules/dagster-ui/packages/ui-core/src/partitions/JobBackfillsTable.tsx index 485f05ca3d268..cc5b3e8e9f227 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/partitions/JobBackfillsTable.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/partitions/JobBackfillsTable.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import { Box, CursorPaginationControls, @@ -8,6 +7,7 @@ import { import {useEffect, useState} from 'react'; import {JobBackfillsQuery, JobBackfillsQueryVariables} from './types/JobBackfillsTable.types'; +import {gql, useQuery} from '../apollo-client'; import {RepositorySelector} from '../graphql/types'; import {BACKFILL_TABLE_FRAGMENT, BackfillTable} from '../instance/backfill/BackfillTable'; import {useBlockTraceOnQueryResult} from '../performance/TraceContext'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/partitions/OpJobPartitionsView.tsx b/js_modules/dagster-ui/packages/ui-core/src/partitions/OpJobPartitionsView.tsx index c10c2ce397fdd..d819222b00588 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/partitions/OpJobPartitionsView.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/partitions/OpJobPartitionsView.tsx @@ -1,4 +1,3 @@ -import {QueryResult, gql, useQuery} from '@apollo/client'; import { Box, Button, @@ -26,6 +25,7 @@ import { } from './types/OpJobPartitionsView.types'; import {PartitionRuns} from './useMatrixData'; import {usePartitionStepQuery} from './usePartitionStepQuery'; +import {QueryResult, gql, useQuery} from '../apollo-client'; import {usePermissionsForLocation} from '../app/Permissions'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {PythonErrorInfo} from '../app/PythonErrorInfo'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/partitions/PartitionRunList.tsx b/js_modules/dagster-ui/packages/ui-core/src/partitions/PartitionRunList.tsx index a31adbf6a3ed8..2874ae99628aa 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/partitions/PartitionRunList.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/partitions/PartitionRunList.tsx @@ -1,10 +1,10 @@ -import {gql, useQuery} from '@apollo/client'; import {NonIdealState, Spinner} from '@dagster-io/ui-components'; import { PartitionRunListQuery, PartitionRunListQueryVariables, } from './types/PartitionRunList.types'; +import {gql, useQuery} from '../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {useBlockTraceOnQueryResult} from '../performance/TraceContext'; import {RunTable} from '../runs/RunTable'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/partitions/PartitionStepStatus.tsx b/js_modules/dagster-ui/packages/ui-core/src/partitions/PartitionStepStatus.tsx index 5aadf5305e789..b82eaa737e99d 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/partitions/PartitionStepStatus.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/partitions/PartitionStepStatus.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import { Box, Button, @@ -38,6 +37,7 @@ import { StatusSquareColor, useMatrixData, } from './useMatrixData'; +import {gql, useQuery} from '../apollo-client'; import {GraphQueryItem} from '../app/GraphQueryImpl'; import {tokenForAssetKey} from '../asset-graph/Utils'; import {AssetPartitionStatus} from '../assets/AssetPartitionStatus'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/partitions/useMatrixData.tsx b/js_modules/dagster-ui/packages/ui-core/src/partitions/useMatrixData.tsx index 8700c7f73a20f..1540597f5a499 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/partitions/useMatrixData.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/partitions/useMatrixData.tsx @@ -1,9 +1,8 @@ -import {gql} from '@apollo/client'; - import { PartitionMatrixSolidHandleFragment, PartitionMatrixStepRunFragment, } from './types/useMatrixData.types'; +import {gql} from '../apollo-client'; import {filterByQuery} from '../app/GraphQueryImpl'; import {GanttChartLayout} from '../gantt/Constants'; import {GanttChartMode} from '../gantt/GanttChart'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/partitions/usePartitionStepQuery.tsx b/js_modules/dagster-ui/packages/ui-core/src/partitions/usePartitionStepQuery.tsx index c25d52b8eb821..ffc588fa3289c 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/partitions/usePartitionStepQuery.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/partitions/usePartitionStepQuery.tsx @@ -1,4 +1,3 @@ -import {ApolloClient, gql, useApolloClient} from '@apollo/client'; import {useEffect, useMemo, useRef, useState} from 'react'; import {PartitionMatrixStepRunFragment} from './types/useMatrixData.types'; @@ -7,6 +6,7 @@ import { PartitionStepLoaderQueryVariables, } from './types/usePartitionStepQuery.types'; import {PARTITION_MATRIX_STEP_RUN_FRAGMENT, PartitionRuns} from './useMatrixData'; +import {ApolloClient, gql, useApolloClient} from '../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {PythonErrorFragment} from '../app/types/PythonErrorFragment.types'; import {RepositorySelector, RunStatus} from '../graphql/types'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/performance/TraceContext.tsx b/js_modules/dagster-ui/packages/ui-core/src/performance/TraceContext.tsx index 945d1e6a80430..79674ddd39867 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/performance/TraceContext.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/performance/TraceContext.tsx @@ -1,6 +1,6 @@ -import {QueryResult} from '@apollo/client'; import {ReactNode, createContext, useContext, useLayoutEffect, useMemo} from 'react'; +import {QueryResult} from '../apollo-client'; import {useDangerousRenderEffect} from '../hooks/useDangerousRenderEffect'; export enum CompletionType { diff --git a/js_modules/dagster-ui/packages/ui-core/src/performance/__tests__/TraceContext.test.tsx b/js_modules/dagster-ui/packages/ui-core/src/performance/__tests__/TraceContext.test.tsx index 6b450ba5a37a1..1ea85cdf273fe 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/performance/__tests__/TraceContext.test.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/performance/__tests__/TraceContext.test.tsx @@ -1,7 +1,7 @@ -import {QueryResult} from '@apollo/client'; import {renderHook} from '@testing-library/react-hooks'; import {ReactNode, useContext} from 'react'; +import {QueryResult} from '../../apollo-client'; import { CompletionType, Dependency, diff --git a/js_modules/dagster-ui/packages/ui-core/src/pipelines/GraphExplorer.tsx b/js_modules/dagster-ui/packages/ui-core/src/pipelines/GraphExplorer.tsx index 6ab1bd2fc1814..13b922841921f 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/pipelines/GraphExplorer.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/pipelines/GraphExplorer.tsx @@ -1,4 +1,3 @@ -import {gql} from '@apollo/client'; // eslint-disable-next-line no-restricted-imports import {Breadcrumbs} from '@blueprintjs/core'; import { @@ -17,6 +16,7 @@ import {ExplorerPath} from './PipelinePathUtils'; import {SIDEBAR_ROOT_CONTAINER_FRAGMENT} from './SidebarContainerOverview'; import {SidebarRoot} from './SidebarRoot'; import {GraphExplorerFragment, GraphExplorerSolidHandleFragment} from './types/GraphExplorer.types'; +import {gql} from '../apollo-client'; import {filterByQuery} from '../app/GraphQueryImpl'; import {Route} from '../app/Route'; import {isHiddenAssetGroupJob} from '../asset-graph/Utils'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/pipelines/PipelineExplorerRoot.tsx b/js_modules/dagster-ui/packages/ui-core/src/pipelines/PipelineExplorerRoot.tsx index 4911059f2702a..b609cffdd71e1 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/pipelines/PipelineExplorerRoot.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/pipelines/PipelineExplorerRoot.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import {useState} from 'react'; import {useHistory, useParams} from 'react-router-dom'; @@ -16,6 +15,7 @@ import { PipelineExplorerRootQuery, PipelineExplorerRootQueryVariables, } from './types/PipelineExplorerRoot.types'; +import {gql, useQuery} from '../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {useTrackPageView} from '../app/analytics'; import {AssetGraphExplorer} from '../asset-graph/AssetGraphExplorer'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/pipelines/PipelineRunsRoot.tsx b/js_modules/dagster-ui/packages/ui-core/src/pipelines/PipelineRunsRoot.tsx index cb6a92fe12235..bd079cd42d532 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/pipelines/PipelineRunsRoot.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/pipelines/PipelineRunsRoot.tsx @@ -1,4 +1,3 @@ -import {gql} from '@apollo/client'; import { Box, ButtonLink, @@ -19,6 +18,7 @@ import { PipelineRunsRootQueryVariables, } from './types/PipelineRunsRoot.types'; import {useJobTitle} from './useJobTitle'; +import {gql} from '../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import { FIFTEEN_SECONDS, diff --git a/js_modules/dagster-ui/packages/ui-core/src/pipelines/SidebarContainerOverview.tsx b/js_modules/dagster-ui/packages/ui-core/src/pipelines/SidebarContainerOverview.tsx index 6a9ec4812711b..fc95a1e42f2d4 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/pipelines/SidebarContainerOverview.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/pipelines/SidebarContainerOverview.tsx @@ -1,4 +1,3 @@ -import {gql} from '@apollo/client'; import {Box, MetadataTable} from '@dagster-io/ui-components'; import {Description} from './Description'; @@ -8,6 +7,7 @@ import { SidebarResourcesSection, } from './SidebarResourcesSection'; import {SidebarRootContainerFragment} from './types/SidebarContainerOverview.types'; +import {gql} from '../apollo-client'; import {breakOnUnderscores} from '../app/Util'; import {MetadataEntry} from '../metadata/MetadataEntry'; import {METADATA_ENTRY_FRAGMENT} from '../metadata/MetadataEntryFragment'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/pipelines/SidebarOp.tsx b/js_modules/dagster-ui/packages/ui-core/src/pipelines/SidebarOp.tsx index 6a8bd1e560943..1d7e46809a665 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/pipelines/SidebarOp.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/pipelines/SidebarOp.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import {Box, Colors, NonIdealState} from '@dagster-io/ui-components'; import {ExplorerPath} from './PipelinePathUtils'; @@ -12,6 +11,7 @@ import { SidebarPipelineOpQuery, SidebarPipelineOpQueryVariables, } from './types/SidebarOp.types'; +import {gql, useQuery} from '../apollo-client'; import {OpNameOrPath} from '../ops/OpNameOrPath'; import {useBlockTraceOnQueryResult} from '../performance/TraceContext'; import {LoadingSpinner} from '../ui/Loading'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/pipelines/SidebarOpDefinition.tsx b/js_modules/dagster-ui/packages/ui-core/src/pipelines/SidebarOpDefinition.tsx index 6014dedbf90ca..545f26fbbb0d6 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/pipelines/SidebarOpDefinition.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/pipelines/SidebarOpDefinition.tsx @@ -1,4 +1,3 @@ -import {gql} from '@apollo/client'; import {Box, Colors, ConfigTypeSchema, FontFamily, Icon} from '@dagster-io/ui-components'; import {useState} from 'react'; import {Link} from 'react-router-dom'; @@ -23,6 +22,7 @@ import { TypeWrapper, } from './SidebarOpHelpers'; import {SidebarOpDefinitionFragment} from './types/SidebarOpDefinition.types'; +import {gql} from '../apollo-client'; import {COMMON_COLLATOR, breakOnUnderscores} from '../app/Util'; import {displayNameForAssetKey, isHiddenAssetGroupJob} from '../asset-graph/Utils'; import {assetDetailsPathForKey} from '../assets/assetDetailsPathForKey'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/pipelines/SidebarOpExecutionGraphs.tsx b/js_modules/dagster-ui/packages/ui-core/src/pipelines/SidebarOpExecutionGraphs.tsx index a496bacec9e98..b32a1d21221ba 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/pipelines/SidebarOpExecutionGraphs.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/pipelines/SidebarOpExecutionGraphs.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import {Box, Colors, Spinner, Tooltip} from '@dagster-io/ui-components'; import {useMemo, useState} from 'react'; import {Link} from 'react-router-dom'; @@ -8,6 +7,7 @@ import { SidebarOpGraphsQuery, SidebarOpGraphsQueryVariables, } from './types/SidebarOpExecutionGraphs.types'; +import {gql, useQuery} from '../apollo-client'; import {AssetValueGraph, AssetValueGraphData} from '../assets/AssetValueGraph'; import {StepStatusDot} from '../gantt/GanttStatusPanel'; import {useBlockTraceOnQueryResult} from '../performance/TraceContext'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/pipelines/SidebarOpInvocation.tsx b/js_modules/dagster-ui/packages/ui-core/src/pipelines/SidebarOpInvocation.tsx index c6aaa23ed6767..9f75596d352bf 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/pipelines/SidebarOpInvocation.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/pipelines/SidebarOpInvocation.tsx @@ -1,9 +1,9 @@ -import {gql} from '@apollo/client'; import {Box, Button, Icon} from '@dagster-io/ui-components'; import {SidebarSection, SidebarTitle} from './SidebarComponents'; import {DependencyHeaderRow, DependencyRow, DependencyTable} from './SidebarOpHelpers'; import {SidebarOpInvocationFragment} from './types/SidebarOpInvocation.types'; +import {gql} from '../apollo-client'; import {breakOnUnderscores} from '../app/Util'; import {OpNameOrPath} from '../ops/OpNameOrPath'; import {DAGSTER_TYPE_WITH_TOOLTIP_FRAGMENT} from '../typeexplorer/TypeWithTooltip'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/pipelines/SidebarResourcesSection.tsx b/js_modules/dagster-ui/packages/ui-core/src/pipelines/SidebarResourcesSection.tsx index 74dd31eb7735e..9657d648fd012 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/pipelines/SidebarResourcesSection.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/pipelines/SidebarResourcesSection.tsx @@ -1,10 +1,10 @@ -import {gql} from '@apollo/client'; import {Box, Colors, ConfigTypeSchema, Icon, IconWrapper} from '@dagster-io/ui-components'; import styled from 'styled-components'; import {Description} from './Description'; import {SectionHeader, SectionItemContainer} from './SidebarComponents'; import {SidebarResourcesSectionFragment} from './types/SidebarResourcesSection.types'; +import {gql} from '../apollo-client'; import {CONFIG_TYPE_SCHEMA_FRAGMENT} from '../typeexplorer/ConfigTypeSchema'; const NO_DESCRIPTION = ''; diff --git a/js_modules/dagster-ui/packages/ui-core/src/resources/ResourceRoot.tsx b/js_modules/dagster-ui/packages/ui-core/src/resources/ResourceRoot.tsx index 9ad6572e8932c..f6132c723c180 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/resources/ResourceRoot.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/resources/ResourceRoot.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import { Alert, Box, @@ -28,6 +27,7 @@ import { ResourceRootQuery, ResourceRootQueryVariables, } from './types/ResourceRoot.types'; +import {gql, useQuery} from '../apollo-client'; import {showCustomAlert} from '../app/CustomAlertProvider'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {useTrackPageView} from '../app/analytics'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/resources/WorkspaceResourcesRoot.tsx b/js_modules/dagster-ui/packages/ui-core/src/resources/WorkspaceResourcesRoot.tsx index 222fe2ff344fc..7ba458d68f7eb 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/resources/WorkspaceResourcesRoot.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/resources/WorkspaceResourcesRoot.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import {Box, Colors, NonIdealState, Spinner, TextInput} from '@dagster-io/ui-components'; import {useMemo} from 'react'; @@ -7,6 +6,7 @@ import { WorkspaceResourcesQuery, WorkspaceResourcesQueryVariables, } from './types/WorkspaceResourcesRoot.types'; +import {gql, useQuery} from '../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {FIFTEEN_SECONDS, useQueryRefreshAtInterval} from '../app/QueryRefresh'; import {useTrackPageView} from '../app/analytics'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/CapturedLogPanel.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/CapturedLogPanel.tsx index 62da263b49fb5..b6d630c89d3ae 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/CapturedLogPanel.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/CapturedLogPanel.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery, useSubscription} from '@apollo/client'; import {Box, Colors, Icon} from '@dagster-io/ui-components'; import * as React from 'react'; @@ -13,6 +12,7 @@ import { CapturedLogsSubscription, CapturedLogsSubscriptionVariables, } from './types/CapturedLogPanel.types'; +import {gql, useQuery, useSubscription} from '../apollo-client'; import {AppContext} from '../app/AppContext'; import {WebSocketContext} from '../app/WebSocketProvider'; import {useBlockTraceOnQueryResult} from '../performance/TraceContext'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/DeletionDialog.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/DeletionDialog.tsx index 52e8a9bfabae6..f2ae05fe1d541 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/DeletionDialog.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/DeletionDialog.tsx @@ -1,4 +1,3 @@ -import {useMutation} from '@apollo/client'; // eslint-disable-next-line no-restricted-imports import {ProgressBar} from '@blueprintjs/core'; import { @@ -16,6 +15,7 @@ import {useEffect, useReducer, useRef} from 'react'; import {NavigationBlock} from './NavigationBlock'; import {DELETE_MUTATION} from './RunUtils'; import {DeleteMutation, DeleteMutationVariables} from './types/RunUtils.types'; +import {useMutation} from '../apollo-client'; export interface Props { isOpen: boolean; diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/LogsProvider.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/LogsProvider.tsx index 6825634d14343..e2f9954d922c1 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/LogsProvider.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/LogsProvider.tsx @@ -1,10 +1,3 @@ -import { - OnSubscriptionDataOptions, - gql, - useApolloClient, - useQuery, - useSubscription, -} from '@apollo/client'; import {TokenizingFieldValue} from '@dagster-io/ui-components'; import throttle from 'lodash/throttle'; import * as React from 'react'; @@ -22,6 +15,13 @@ import { RunLogsSubscriptionSuccessFragment, } from './types/LogsProvider.types'; import {RunDagsterRunEventFragment} from './types/RunFragments.types'; +import { + OnSubscriptionDataOptions, + gql, + useApolloClient, + useQuery, + useSubscription, +} from '../apollo-client'; import {WebSocketContext} from '../app/WebSocketProvider'; import {RunStatus} from '../graphql/types'; import {CompletionType, useTraceDependency} from '../performance/TraceContext'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/LogsRow.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/LogsRow.tsx index 3764dee05e7ac..1f7028d37052a 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/LogsRow.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/LogsRow.tsx @@ -1,4 +1,3 @@ -import {gql} from '@apollo/client'; import {Box, Button, Dialog, DialogBody, DialogFooter} from '@dagster-io/ui-components'; import * as React from 'react'; import {useMemo, useState} from 'react'; @@ -14,6 +13,7 @@ import { import {LogsRowStructuredContent} from './LogsRowStructuredContent'; import {IRunMetadataDict} from './RunMetadataProvider'; import {LogsRowStructuredFragment, LogsRowUnstructuredFragment} from './types/LogsRow.types'; +import {gql} from '../apollo-client'; import {showCustomAlert} from '../app/CustomAlertProvider'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {PythonErrorInfo} from '../app/PythonErrorInfo'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/LogsScrollingTableMessageFragment.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/LogsScrollingTableMessageFragment.tsx index 02a787cb8da43..cb05013ed76b6 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/LogsScrollingTableMessageFragment.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/LogsScrollingTableMessageFragment.tsx @@ -1,6 +1,5 @@ -import {gql} from '@apollo/client'; - import {LOGS_ROW_STRUCTURED_FRAGMENT, LOGS_ROW_UNSTRUCTURED_FRAGMENT} from './LogsRow'; +import {gql} from '../apollo-client'; export const LOGS_SCROLLING_TABLE_MESSAGE_FRAGMENT = gql` fragment LogsScrollingTableMessageFragment on DagsterRunEvent { diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/QueuedRunCriteriaDialog.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/QueuedRunCriteriaDialog.tsx index 30f8c4e312108..beaa53c48135d 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/QueuedRunCriteriaDialog.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/QueuedRunCriteriaDialog.tsx @@ -1,4 +1,3 @@ -import {useQuery} from '@apollo/client'; import { Box, Button, @@ -23,6 +22,7 @@ import { QueuedRunCriteriaQueryVariables, } from './types/QueuedRunCriteriaQuery.types'; import {RunFragment} from './types/RunFragments.types'; +import {useQuery} from '../apollo-client'; import {useRunQueueConfig} from '../instance/useRunQueueConfig'; import {StructuredContentTable} from '../metadata/MetadataEntry'; import {numberFormatter} from '../ui/formatters'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/QueuedRunCriteriaQuery.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/QueuedRunCriteriaQuery.tsx index 947cb6fabd3ce..7996865226335 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/QueuedRunCriteriaQuery.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/QueuedRunCriteriaQuery.tsx @@ -1,4 +1,4 @@ -import {gql} from '@apollo/client'; +import {gql} from '../apollo-client'; export const QUEUED_RUN_CRITERIA_QUERY = gql` query QueuedRunCriteriaQuery($runId: ID!) { diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/QueuedRunsBanners.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/QueuedRunsBanners.tsx index c7f99258a3b02..0092578d215cb 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/QueuedRunsBanners.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/QueuedRunsBanners.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import {Alert, Box} from '@dagster-io/ui-components'; import {useContext} from 'react'; import {Link} from 'react-router-dom'; @@ -7,6 +6,7 @@ import { QueueDaemonStatusQuery, QueueDaemonStatusQueryVariables, } from './types/QueuedRunsBanners.types'; +import {gql, useQuery} from '../apollo-client'; import {InstancePageContext} from '../instance/InstancePageContext'; import {useCanSeeConfig} from '../instance/useCanSeeConfig'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/ReexecutionDialog.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/ReexecutionDialog.tsx index 6ca6bb6fb3a80..65e74d993bb8b 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/ReexecutionDialog.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/ReexecutionDialog.tsx @@ -1,4 +1,3 @@ -import {useMutation} from '@apollo/client'; // eslint-disable-next-line no-restricted-imports import {ProgressBar} from '@blueprintjs/core'; import { @@ -19,6 +18,7 @@ import { LaunchPipelineReexecutionMutation, LaunchPipelineReexecutionMutationVariables, } from './types/RunUtils.types'; +import {useMutation} from '../apollo-client'; import {ReexecutionStrategy} from '../graphql/types'; interface Props { diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/RunActionsMenu.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/RunActionsMenu.tsx index aa4a4b63e09d0..2c35a009b6a04 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/RunActionsMenu.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/RunActionsMenu.tsx @@ -1,4 +1,3 @@ -import {gql, useLazyQuery} from '@apollo/client'; import { Box, Button, @@ -36,6 +35,7 @@ import { import {RunTableRunFragment} from './types/RunTableRunFragment.types'; import {useJobAvailabilityErrorForRun} from './useJobAvailabilityErrorForRun'; import {useJobReexecution} from './useJobReExecution'; +import {gql, useLazyQuery} from '../apollo-client'; import {AppContext} from '../app/AppContext'; import {showSharedToaster} from '../app/DomUtils'; import {DEFAULT_DISABLED_REASON} from '../app/Permissions'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/RunAssetTags.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/RunAssetTags.tsx index 006ed1cbeb064..d02709c9f5195 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/RunAssetTags.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/RunAssetTags.tsx @@ -1,8 +1,7 @@ -import {gql, useQuery} from '@apollo/client'; - import {AssetKeyTagCollection} from './AssetTagCollections'; import {RunAssetsQuery, RunAssetsQueryVariables} from './types/RunAssetTags.types'; import {RunFragment} from './types/RunFragments.types'; +import {gql, useQuery} from '../apollo-client'; import {isHiddenAssetGroupJob} from '../asset-graph/Utils'; import {useBlockTraceOnQueryResult} from '../performance/TraceContext'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/RunFragments.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/RunFragments.tsx index 03fc9e4632117..214ba81ad0cf7 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/RunFragments.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/RunFragments.tsx @@ -1,8 +1,7 @@ -import {gql} from '@apollo/client'; - import {LOGS_SCROLLING_TABLE_MESSAGE_FRAGMENT} from './LogsScrollingTableMessageFragment'; import {RUN_METADATA_PROVIDER_MESSAGE_FRAGMENT} from './RunMetadataProvider'; import {RUN_TIMING_FRAGMENT} from './RunTimingDetails'; +import {gql} from '../apollo-client'; import {EXECUTION_PLAN_TO_GRAPH_FRAGMENT} from '../gantt/toGraphQueryItems'; export const RUN_FRAGMENT = gql` diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/RunHeaderActions.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/RunHeaderActions.tsx index f5136dca7fb88..38db35889aefd 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/RunHeaderActions.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/RunHeaderActions.tsx @@ -1,4 +1,3 @@ -import {useMutation} from '@apollo/client'; import {Button, Group, Icon, Menu, MenuItem, Popover, Tooltip} from '@dagster-io/ui-components'; import {useContext, useState} from 'react'; import {useHistory} from 'react-router-dom'; @@ -12,6 +11,7 @@ import {DagsterTag} from './RunTag'; import {RunsQueryRefetchContext} from './RunUtils'; import {TerminationDialog} from './TerminationDialog'; import {RunFragment} from './types/RunFragments.types'; +import {useMutation} from '../apollo-client'; import {AppContext} from '../app/AppContext'; import {showSharedToaster} from '../app/DomUtils'; import {useCopyToClipboard} from '../app/browser'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/RunListTabs.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/RunListTabs.tsx index c1ecfbfdf026c..58985608d370b 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/RunListTabs.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/RunListTabs.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import {Colors, JoinedButtons, TokenizingFieldValue} from '@dagster-io/ui-components'; import isEqual from 'lodash/isEqual'; import {useMemo} from 'react'; @@ -8,6 +7,7 @@ import styled, {css} from 'styled-components'; import {failedStatuses, inProgressStatuses, queuedStatuses} from './RunStatuses'; import {runsPathWithFilters, useQueryPersistedRunFilters} from './RunsFilterInput'; import {RunTabsCountQuery, RunTabsCountQueryVariables} from './types/RunListTabs.types'; +import {gql, useQuery} from '../apollo-client'; import {RunStatus, RunsFilter} from '../graphql/types'; import {useDocumentTitle} from '../hooks/useDocumentTitle'; import {useBlockTraceOnQueryResult} from '../performance/TraceContext'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/RunMetadataProvider.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/RunMetadataProvider.tsx index d509c3933a728..cad8921b01529 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/RunMetadataProvider.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/RunMetadataProvider.tsx @@ -1,10 +1,10 @@ -import {gql} from '@apollo/client'; import * as React from 'react'; import {LogsProviderLogs} from './LogsProvider'; import {RunContext} from './RunContext'; import {RunFragment} from './types/RunFragments.types'; import {RunMetadataProviderMessageFragment} from './types/RunMetadataProvider.types'; +import {gql} from '../apollo-client'; import {StepEventStatus} from '../graphql/types'; import {METADATA_ENTRY_FRAGMENT} from '../metadata/MetadataEntryFragment'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/RunRoot.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/RunRoot.tsx index 830c7be3a367e..a3e53425c808e 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/RunRoot.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/RunRoot.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import {Box, FontFamily, Heading, NonIdealState, PageHeader, Tag} from '@dagster-io/ui-components'; import {useMemo} from 'react'; import {useParams} from 'react-router-dom'; @@ -14,6 +13,7 @@ import {RunTimingTags} from './RunTimingTags'; import {assetKeysForRun} from './RunUtils'; import {TickTagForRun} from './TickTagForRun'; import {RunRootQuery, RunRootQueryVariables} from './types/RunRoot.types'; +import {gql, useQuery} from '../apollo-client'; import {useTrackPageView} from '../app/analytics'; import {isHiddenAssetGroupJob} from '../asset-graph/Utils'; import {AutomaterializeTagWithEvaluation} from '../assets/AutomaterializeTagWithEvaluation'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/RunStats.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/RunStats.tsx index 611a47a86f39e..02ceac35bc8c7 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/RunStats.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/RunStats.tsx @@ -1,9 +1,9 @@ -import {gql, useQuery} from '@apollo/client'; import {Box, Spinner} from '@dagster-io/ui-components'; import {Link} from 'react-router-dom'; import styled from 'styled-components'; import {RunStatsQuery, RunStatsQueryVariables} from './types/RunStats.types'; +import {gql, useQuery} from '../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {PythonErrorInfo} from '../app/PythonErrorInfo'; import {useBlockTraceOnQueryResult} from '../performance/TraceContext'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/RunTableRunFragment.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/RunTableRunFragment.tsx index 18179c0ab28ea..74f5178894af0 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/RunTableRunFragment.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/RunTableRunFragment.tsx @@ -1,7 +1,6 @@ -import {gql} from '@apollo/client'; - import {RUN_TAGS_FRAGMENT} from './RunTagsFragment'; import {RUN_TIME_FRAGMENT} from './RunUtils'; +import {gql} from '../apollo-client'; export const RUN_TABLE_RUN_FRAGMENT = gql` fragment RunTableRunFragment on Run { diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/RunTagsFragment.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/RunTagsFragment.tsx index cefc7efac1758..868ad1097ea92 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/RunTagsFragment.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/RunTagsFragment.tsx @@ -1,4 +1,4 @@ -import {gql} from '@apollo/client'; +import {gql} from '../apollo-client'; export const RUN_TAGS_FRAGMENT = gql` fragment RunTagsFragment on PipelineTag { diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/RunTimingDetails.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/RunTimingDetails.tsx index 1756796b6ce2c..78530634a32af 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/RunTimingDetails.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/RunTimingDetails.tsx @@ -1,9 +1,9 @@ -import {gql} from '@apollo/client'; import {Colors, MetadataTable} from '@dagster-io/ui-components'; import * as React from 'react'; import {TimeElapsed} from './TimeElapsed'; import {RunTimingFragment} from './types/RunTimingDetails.types'; +import {gql} from '../apollo-client'; import {RunStatus} from '../graphql/types'; import {TimestampDisplay} from '../schedules/TimestampDisplay'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/RunUtils.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/RunUtils.tsx index 245526ea786d6..0c8115d91aa30 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/RunUtils.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/RunUtils.tsx @@ -1,4 +1,3 @@ -import {gql} from '@apollo/client'; import {History} from 'history'; import qs from 'qs'; import {createContext, memo, useEffect} from 'react'; @@ -10,6 +9,7 @@ import {RunFragment} from './types/RunFragments.types'; import {RunTableRunFragment} from './types/RunTableRunFragment.types'; import {LaunchPipelineExecutionMutation, RunTimeFragment} from './types/RunUtils.types'; import {Mono} from '../../../ui-components/src'; +import {gql} from '../apollo-client'; import {showCustomAlert} from '../app/CustomAlertProvider'; import {showSharedToaster} from '../app/DomUtils'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/RunsFilterInput.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/RunsFilterInput.tsx index e92115ef43600..1443979bbdf1e 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/RunsFilterInput.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/RunsFilterInput.tsx @@ -1,4 +1,3 @@ -import {gql, useApolloClient, useLazyQuery} from '@apollo/client'; import { Box, Icon, @@ -16,6 +15,7 @@ import { RunTagValuesQuery, RunTagValuesQueryVariables, } from './types/RunsFilterInput.types'; +import {gql, useApolloClient, useLazyQuery} from '../apollo-client'; import {COMMON_COLLATOR} from '../app/Util'; import {__ASSET_JOB_PREFIX} from '../asset-graph/Utils'; import {RunStatus, RunsFilter} from '../graphql/types'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/RunsRoot.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/RunsRoot.tsx index 557194d10b3c5..50a61a0cc490c 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/RunsRoot.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/RunsRoot.tsx @@ -1,4 +1,3 @@ -import {ApolloError} from '@apollo/client'; import { Box, ButtonLink, @@ -26,6 +25,7 @@ import { } from './RunsFilterInput'; import {TerminateAllRunsButton} from './TerminateAllRunsButton'; import {usePaginatedRunsTableRuns} from './usePaginatedRunsTableRuns'; +import {ApolloError} from '../apollo-client'; import { FIFTEEN_SECONDS, QueryRefreshCountdown, diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/ScheduledRunListRoot.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/ScheduledRunListRoot.tsx index 45e2084652894..f60fd7fd78070 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/ScheduledRunListRoot.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/ScheduledRunListRoot.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import { Alert, Box, @@ -15,6 +14,7 @@ import { ScheduledRunsListQuery, ScheduledRunsListQueryVariables, } from './types/ScheduledRunListRoot.types'; +import {gql, useQuery} from '../apollo-client'; import {showCustomAlert} from '../app/CustomAlertProvider'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import { diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/TerminateAllRunsButton.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/TerminateAllRunsButton.tsx index 0cbf255c1cb8a..4702ad54e974d 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/TerminateAllRunsButton.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/TerminateAllRunsButton.tsx @@ -1,4 +1,3 @@ -import {gql, useApolloClient} from '@apollo/client'; import {Button} from '@dagster-io/ui-components'; import isEqual from 'lodash/isEqual'; import {useState} from 'react'; @@ -9,6 +8,7 @@ import { TerminateRunIdsQuery, TerminateRunIdsQueryVariables, } from './types/TerminateAllRunsButton.types'; +import {gql, useApolloClient} from '../apollo-client'; import {RunsFilter} from '../graphql/types'; export const TerminateAllRunsButton = ({ diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/TerminationDialog.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/TerminationDialog.tsx index df3035ca6176d..bc0e48db43261 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/TerminationDialog.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/TerminationDialog.tsx @@ -1,4 +1,3 @@ -import {useMutation} from '@apollo/client'; // eslint-disable-next-line no-restricted-imports import {ProgressBar} from '@blueprintjs/core'; import { @@ -19,6 +18,7 @@ import * as React from 'react'; import {NavigationBlock} from './NavigationBlock'; import {TERMINATE_MUTATION} from './RunUtils'; import {TerminateMutation, TerminateMutationVariables} from './types/RunUtils.types'; +import {useMutation} from '../apollo-client'; import {getSharedToaster} from '../app/DomUtils'; import {TerminateRunPolicy} from '../graphql/types'; import {testId} from '../testing/testId'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/__tests__/RunActionButtonsTestQuery.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/__tests__/RunActionButtonsTestQuery.tsx index 0645a41a1106a..fa689db5b6ac2 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/__tests__/RunActionButtonsTestQuery.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/__tests__/RunActionButtonsTestQuery.tsx @@ -1,5 +1,4 @@ -import {gql} from '@apollo/client'; - +import {gql} from '../../apollo-client'; import {RUN_FRAGMENT} from '../RunFragments'; export const RUN_ACTION_BUTTONS_TEST_QUERY = gql` diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/useCursorAccumulatedQuery.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/useCursorAccumulatedQuery.tsx index 27ccf2c42f2f1..7394e951df5ba 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/useCursorAccumulatedQuery.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/useCursorAccumulatedQuery.tsx @@ -1,7 +1,7 @@ -import {OperationVariables, useApolloClient} from '@apollo/client'; import {DocumentNode} from 'graphql'; import {useEffect, useMemo, useState} from 'react'; +import {OperationVariables, useApolloClient} from '../apollo-client'; import {useRefreshAtInterval} from '../app/QueryRefresh'; type FetchResult = { diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/useCursorPaginatedQuery.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/useCursorPaginatedQuery.tsx index 77f0582106601..bc0ff7308ed88 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/useCursorPaginatedQuery.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/useCursorPaginatedQuery.tsx @@ -1,8 +1,8 @@ -import {useQuery} from '@apollo/client'; import {CursorPaginationProps} from '@dagster-io/ui-components'; import {DocumentNode} from 'graphql'; import {useState} from 'react'; +import {useQuery} from '../apollo-client'; import {useQueryPersistedState} from '../hooks/useQueryPersistedState'; interface CursorPaginationQueryVariables { diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/useJobReExecution.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/useJobReExecution.tsx index 20495f20f924e..3dae5520b2531 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/useJobReExecution.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/useJobReExecution.tsx @@ -1,4 +1,3 @@ -import {useMutation} from '@apollo/client'; import {useCallback} from 'react'; import {useHistory} from 'react-router-dom'; @@ -7,6 +6,7 @@ import { LaunchPipelineReexecutionMutation, LaunchPipelineReexecutionMutationVariables, } from './types/RunUtils.types'; +import {useMutation} from '../apollo-client'; import {ExecutionParams, ReexecutionStrategy} from '../graphql/types'; import {showLaunchError} from '../launchpad/showLaunchError'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/usePaginatedRunsTableRuns.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/usePaginatedRunsTableRuns.tsx index c10c51a2425ea..ab23da7437ecf 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/usePaginatedRunsTableRuns.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/usePaginatedRunsTableRuns.tsx @@ -1,8 +1,7 @@ -import {gql} from '@apollo/client'; - import {RUN_TABLE_RUN_FRAGMENT} from './RunTableRunFragment'; import {RunsRootQuery, RunsRootQueryVariables} from './types/usePaginatedRunsTableRuns.types'; import {useCursorPaginatedQuery} from './useCursorPaginatedQuery'; +import {gql} from '../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {RunsFilter} from '../graphql/types'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/useRunsForTimeline.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/useRunsForTimeline.tsx index efb52b2128776..d44c526f74d94 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/useRunsForTimeline.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/useRunsForTimeline.tsx @@ -1,4 +1,3 @@ -import {QueryResult, gql, useApolloClient} from '@apollo/client'; import {useCallback, useContext, useLayoutEffect, useMemo, useRef, useState} from 'react'; import {HourlyDataCache, getHourlyBuckets} from './HourlyDataCache/HourlyDataCache'; @@ -17,6 +16,7 @@ import { OngoingRunTimelineQueryVariables, RunTimelineFragment, } from './types/useRunsForTimeline.types'; +import {QueryResult, gql, useApolloClient} from '../apollo-client'; import {AppContext} from '../app/AppContext'; import {FIFTEEN_SECONDS, useRefreshAtInterval} from '../app/QueryRefresh'; import {isHiddenAssetGroupJob} from '../asset-graph/Utils'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/schedules/ScheduleAssetSelectionsQuery.tsx b/js_modules/dagster-ui/packages/ui-core/src/schedules/ScheduleAssetSelectionsQuery.tsx index 8a7f11fece7be..a62c30e83aee7 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/schedules/ScheduleAssetSelectionsQuery.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/schedules/ScheduleAssetSelectionsQuery.tsx @@ -1,5 +1,4 @@ -import {gql} from '@apollo/client'; - +import {gql} from '../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {AUTOMATION_ASSET_SELECTION_FRAGMENT} from '../automation/AutomationAssetSelectionFragment'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/schedules/ScheduleMutations.tsx b/js_modules/dagster-ui/packages/ui-core/src/schedules/ScheduleMutations.tsx index c9565e14d3bb5..08ed1e3d80d34 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/schedules/ScheduleMutations.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/schedules/ScheduleMutations.tsx @@ -1,10 +1,9 @@ -import {gql} from '@apollo/client'; - import { ResetScheduleMutation, StartThisScheduleMutation, StopScheduleMutation, } from './types/ScheduleMutations.types'; +import {gql} from '../apollo-client'; import {showCustomAlert} from '../app/CustomAlertProvider'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {PythonErrorInfo} from '../app/PythonErrorInfo'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/schedules/SchedulePartitionStatus.tsx b/js_modules/dagster-ui/packages/ui-core/src/schedules/SchedulePartitionStatus.tsx index 4db4af05a8be8..cfbb98010ab81 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/schedules/SchedulePartitionStatus.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/schedules/SchedulePartitionStatus.tsx @@ -1,4 +1,3 @@ -import {gql, useLazyQuery} from '@apollo/client'; import {ButtonLink, Caption, Colors, Group} from '@dagster-io/ui-components'; import qs from 'qs'; import {memo, useCallback, useMemo} from 'react'; @@ -11,6 +10,7 @@ import { SchedulePartitionStatusResultFragment, } from './types/SchedulePartitionStatus.types'; import {ScheduleFragment} from './types/ScheduleUtils.types'; +import {gql, useLazyQuery} from '../apollo-client'; import {assertUnreachable} from '../app/Util'; import {RunStatus} from '../graphql/types'; import {StatusTable} from '../instigation/InstigationUtils'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/schedules/ScheduleResetButton.tsx b/js_modules/dagster-ui/packages/ui-core/src/schedules/ScheduleResetButton.tsx index f1c448a181a1e..9ecbd0dde86ac 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/schedules/ScheduleResetButton.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/schedules/ScheduleResetButton.tsx @@ -1,4 +1,3 @@ -import {useMutation} from '@apollo/client'; import {Button, Tooltip} from '@dagster-io/ui-components'; import * as React from 'react'; @@ -8,6 +7,7 @@ import { ResetScheduleMutationVariables, } from './types/ScheduleMutations.types'; import {ScheduleFragment} from './types/ScheduleUtils.types'; +import {useMutation} from '../apollo-client'; import {DEFAULT_DISABLED_REASON, usePermissionsForLocation} from '../app/Permissions'; import {repoAddressToSelector} from '../workspace/repoAddressToSelector'; import {RepoAddress} from '../workspace/types'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/schedules/ScheduleRoot.tsx b/js_modules/dagster-ui/packages/ui-core/src/schedules/ScheduleRoot.tsx index 135e16dcd2350..54796958450c8 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/schedules/ScheduleRoot.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/schedules/ScheduleRoot.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import {NonIdealState, Page, Tab, Tabs} from '@dagster-io/ui-components'; import * as React from 'react'; import {useParams} from 'react-router-dom'; @@ -18,6 +17,7 @@ import { ScheduleRootQueryVariables, } from './types/ScheduleRoot.types'; import {ScheduleFragment} from './types/ScheduleUtils.types'; +import {gql, useQuery} from '../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {FIFTEEN_SECONDS, useMergedRefresh, useQueryRefreshAtInterval} from '../app/QueryRefresh'; import {useTrackPageView} from '../app/analytics'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/schedules/ScheduleStateChangeDialog.tsx b/js_modules/dagster-ui/packages/ui-core/src/schedules/ScheduleStateChangeDialog.tsx index ac1fc6b58e760..44caf8dfc9dcf 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/schedules/ScheduleStateChangeDialog.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/schedules/ScheduleStateChangeDialog.tsx @@ -1,4 +1,3 @@ -import {useMutation} from '@apollo/client'; // eslint-disable-next-line no-restricted-imports import {ProgressBar} from '@blueprintjs/core'; import { @@ -19,6 +18,7 @@ import { StopScheduleMutation, StopScheduleMutationVariables, } from './types/ScheduleMutations.types'; +import {useMutation} from '../apollo-client'; import { OpenWithIntent, useInstigationStateReducer, diff --git a/js_modules/dagster-ui/packages/ui-core/src/schedules/ScheduleSwitch.tsx b/js_modules/dagster-ui/packages/ui-core/src/schedules/ScheduleSwitch.tsx index 0243893e1c8bd..1cf94e9dd45a5 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/schedules/ScheduleSwitch.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/schedules/ScheduleSwitch.tsx @@ -1,4 +1,3 @@ -import {gql, useMutation, useQuery} from '@apollo/client'; import {Box, Checkbox, Colors, Icon, Spinner, Tooltip} from '@dagster-io/ui-components'; import {useMemo} from 'react'; @@ -18,6 +17,7 @@ import { ScheduleStateQueryVariables, ScheduleSwitchFragment, } from './types/ScheduleSwitch.types'; +import {gql, useMutation, useQuery} from '../apollo-client'; import {usePermissionsForLocation} from '../app/Permissions'; import {InstigationStatus} from '../graphql/types'; import {INSTIGATION_STATE_BASE_FRAGMENT} from '../instigation/InstigationStateBaseFragment'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/schedules/ScheduleUtils.tsx b/js_modules/dagster-ui/packages/ui-core/src/schedules/ScheduleUtils.tsx index a9fae9edfde18..341efd9de2b98 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/schedules/ScheduleUtils.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/schedules/ScheduleUtils.tsx @@ -1,5 +1,4 @@ -import {gql} from '@apollo/client'; - +import {gql} from '../apollo-client'; import {INSTIGATION_STATE_FRAGMENT} from '../instigation/InstigationUtils'; export const SCHEDULE_FRAGMENT = gql` diff --git a/js_modules/dagster-ui/packages/ui-core/src/schedules/SchedulesNextTicks.tsx b/js_modules/dagster-ui/packages/ui-core/src/schedules/SchedulesNextTicks.tsx index 39edda2f9d1bc..87f6166ecbcbc 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/schedules/SchedulesNextTicks.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/schedules/SchedulesNextTicks.tsx @@ -1,4 +1,3 @@ -import {gql, useLazyQuery} from '@apollo/client'; import { Box, Button, @@ -33,6 +32,7 @@ import { ScheduleTickConfigQuery, ScheduleTickConfigQueryVariables, } from './types/SchedulesNextTicks.types'; +import {gql, useLazyQuery} from '../apollo-client'; import {showSharedToaster} from '../app/DomUtils'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {PythonErrorInfo} from '../app/PythonErrorInfo'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/search/__tests__/useIndexedDBCachedQuery.test.tsx b/js_modules/dagster-ui/packages/ui-core/src/search/__tests__/useIndexedDBCachedQuery.test.tsx index 2af49e6236f49..8f16228b27fc2 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/search/__tests__/useIndexedDBCachedQuery.test.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/search/__tests__/useIndexedDBCachedQuery.test.tsx @@ -1,9 +1,9 @@ -import {useApolloClient} from '@apollo/client'; import {MockedProvider, MockedResponse} from '@apollo/client/testing'; import {act, renderHook} from '@testing-library/react-hooks'; import {cache as _cache} from 'idb-lru-cache'; import {ReactNode, useMemo} from 'react'; +import {useApolloClient} from '../../apollo-client'; import {ASSET_CATALOG_TABLE_QUERY} from '../../assets/AssetsCatalogTable'; import {AssetCatalogTableMockAssets} from '../../assets/__fixtures__/AssetTables.fixtures'; import { diff --git a/js_modules/dagster-ui/packages/ui-core/src/search/useGlobalSearch.tsx b/js_modules/dagster-ui/packages/ui-core/src/search/useGlobalSearch.tsx index 3602591e68818..723cd9ec841f4 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/search/useGlobalSearch.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/search/useGlobalSearch.tsx @@ -1,4 +1,3 @@ -import {gql} from '@apollo/client'; import qs from 'qs'; import {useCallback, useContext, useEffect, useRef} from 'react'; @@ -12,6 +11,7 @@ import { SearchSecondaryQueryVariables, } from './types/useGlobalSearch.types'; import {useIndexedDBCachedQuery} from './useIndexedDBCachedQuery'; +import {gql} from '../apollo-client'; import {AppContext} from '../app/AppContext'; import {CloudOSSContext} from '../app/CloudOSSContext'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/search/useIndexedDBCachedQuery.tsx b/js_modules/dagster-ui/packages/ui-core/src/search/useIndexedDBCachedQuery.tsx index 27231765a001d..8733b13aaf8ee 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/search/useIndexedDBCachedQuery.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/search/useIndexedDBCachedQuery.tsx @@ -1,14 +1,14 @@ +import {cache} from 'idb-lru-cache'; +import memoize from 'lodash/memoize'; +import React, {createContext, useCallback, useContext} from 'react'; + import { ApolloClient, ApolloError, DocumentNode, OperationVariables, useApolloClient, -} from '@apollo/client'; -import {cache} from 'idb-lru-cache'; -import memoize from 'lodash/memoize'; -import React, {createContext, useCallback, useContext} from 'react'; - +} from '../apollo-client'; import {useUpdatingRef} from '../hooks/useUpdatingRef'; type CacheData = { diff --git a/js_modules/dagster-ui/packages/ui-core/src/sensors/AssetSensorTicksQuery.tsx b/js_modules/dagster-ui/packages/ui-core/src/sensors/AssetSensorTicksQuery.tsx index 24de76821aae2..98bebeb8ec915 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/sensors/AssetSensorTicksQuery.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/sensors/AssetSensorTicksQuery.tsx @@ -1,5 +1,4 @@ -import {gql} from '@apollo/client'; - +import {gql} from '../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {ASSET_DAEMON_TICK_FRAGMENT} from '../assets/auto-materialization/AssetDaemonTicksQuery'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/sensors/EditCursorDialog.tsx b/js_modules/dagster-ui/packages/ui-core/src/sensors/EditCursorDialog.tsx index f7da15534210a..2798a32477ed5 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/sensors/EditCursorDialog.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/sensors/EditCursorDialog.tsx @@ -1,4 +1,3 @@ -import {gql, useMutation} from '@apollo/client'; import { Button, ButtonLink, @@ -17,6 +16,7 @@ import { SetSensorCursorMutation, SetSensorCursorMutationVariables, } from './types/EditCursorDialog.types'; +import {gql, useMutation} from '../apollo-client'; import {showCustomAlert} from '../app/CustomAlertProvider'; import {showSharedToaster} from '../app/DomUtils'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorFragment.tsx b/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorFragment.tsx index 43cb546c52809..38913ca2c12f7 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorFragment.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorFragment.tsx @@ -1,5 +1,4 @@ -import {gql} from '@apollo/client'; - +import {gql} from '../apollo-client'; import {INSTIGATION_STATE_FRAGMENT} from '../instigation/InstigationUtils'; export const SENSOR_FRAGMENT = gql` diff --git a/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorMutations.tsx b/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorMutations.tsx index 0f178df52f55e..5a1b2e6055a8e 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorMutations.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorMutations.tsx @@ -1,10 +1,9 @@ -import {gql} from '@apollo/client'; - import { ResetSensorMutation, StartSensorMutation, StopRunningSensorMutation, } from './types/SensorMutations.types'; +import {gql} from '../apollo-client'; import {showCustomAlert} from '../app/CustomAlertProvider'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {PythonErrorInfo} from '../app/PythonErrorInfo'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorPageAutomaterialize.tsx b/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorPageAutomaterialize.tsx index df979615b1ae2..dd3181f97b1f4 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorPageAutomaterialize.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorPageAutomaterialize.tsx @@ -1,4 +1,3 @@ -import {useLazyQuery} from '@apollo/client'; import {Box, Colors, Spinner, Subtitle2} from '@dagster-io/ui-components'; import {useCallback, useMemo, useState} from 'react'; @@ -9,6 +8,7 @@ import { AssetSensorTicksQueryVariables, } from './types/AssetSensorTicksQuery.types'; import {SensorFragment} from './types/SensorFragment.types'; +import {useLazyQuery} from '../apollo-client'; import {useRefreshAtInterval} from '../app/QueryRefresh'; import {AutomaterializationTickDetailDialog} from '../assets/auto-materialization/AutomaterializationTickDetailDialog'; import {AutomaterializeRunHistoryTable} from '../assets/auto-materialization/AutomaterializeRunHistoryTable'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorPreviousRuns.tsx b/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorPreviousRuns.tsx index 887f03a0613b0..4861b66b30089 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorPreviousRuns.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorPreviousRuns.tsx @@ -1,4 +1,3 @@ -import {gql} from '@apollo/client'; import {CursorHistoryControls} from '@dagster-io/ui-components'; import * as React from 'react'; @@ -7,6 +6,7 @@ import { PreviousRunsForSensorQuery, PreviousRunsForSensorQueryVariables, } from './types/SensorPreviousRuns.types'; +import {gql} from '../apollo-client'; import {useQueryRefreshAtInterval} from '../app/QueryRefresh'; import {useBlockTraceOnQueryResult} from '../performance/TraceContext'; import {RunTable} from '../runs/RunTable'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorResetButton.tsx b/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorResetButton.tsx index 1cd8ef0e77856..fa91b5ef6bcad 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorResetButton.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorResetButton.tsx @@ -1,10 +1,10 @@ -import {useMutation} from '@apollo/client'; import {Button, Tooltip} from '@dagster-io/ui-components'; import * as React from 'react'; import {RESET_SENSOR_MUTATION, displaySensorMutationErrors} from './SensorMutations'; import {SensorFragment} from './types/SensorFragment.types'; import {ResetSensorMutation, ResetSensorMutationVariables} from './types/SensorMutations.types'; +import {useMutation} from '../apollo-client'; import {DEFAULT_DISABLED_REASON, usePermissionsForLocation} from '../app/Permissions'; import {repoAddressToSelector} from '../workspace/repoAddressToSelector'; import {RepoAddress} from '../workspace/types'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorRoot.tsx b/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorRoot.tsx index c295a342ec8ec..10586ca503e9f 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorRoot.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorRoot.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import {Box, ButtonGroup, Colors, NonIdealState, Page, Spinner} from '@dagster-io/ui-components'; import {useMemo, useState} from 'react'; import {Redirect, useParams} from 'react-router-dom'; @@ -14,6 +13,7 @@ import { SensorRootQuery, SensorRootQueryVariables, } from './types/SensorRoot.types'; +import {gql, useQuery} from '../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {PythonErrorInfo} from '../app/PythonErrorInfo'; import {FIFTEEN_SECONDS, useMergedRefresh, useQueryRefreshAtInterval} from '../app/QueryRefresh'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorStateChangeDialog.tsx b/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorStateChangeDialog.tsx index 1b85322654785..efb7176c84488 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorStateChangeDialog.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorStateChangeDialog.tsx @@ -1,4 +1,3 @@ -import {useMutation} from '@apollo/client'; // eslint-disable-next-line no-restricted-imports import {ProgressBar} from '@blueprintjs/core'; import { @@ -19,6 +18,7 @@ import { StopRunningSensorMutation, StopRunningSensorMutationVariables, } from './types/SensorMutations.types'; +import {useMutation} from '../apollo-client'; import { OpenWithIntent, useInstigationStateReducer, diff --git a/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorStateQuery.tsx b/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorStateQuery.tsx index bded35a96f547..df3f3717ce2d6 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorStateQuery.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorStateQuery.tsx @@ -1,5 +1,4 @@ -import {gql} from '@apollo/client'; - +import {gql} from '../apollo-client'; import {INSTIGATION_STATE_BASE_FRAGMENT} from '../instigation/InstigationStateBaseFragment'; export const SENSOR_STATE_QUERY = gql` diff --git a/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorSwitch.tsx b/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorSwitch.tsx index 181e0c972dd9f..266e2ca147f57 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorSwitch.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/sensors/SensorSwitch.tsx @@ -1,4 +1,3 @@ -import {gql, useMutation, useQuery} from '@apollo/client'; import { Box, Button, @@ -33,6 +32,7 @@ import { } from './types/SensorMutations.types'; import {SensorStateQuery, SensorStateQueryVariables} from './types/SensorStateQuery.types'; import {SensorSwitchFragment} from './types/SensorSwitch.types'; +import {gql, useMutation, useQuery} from '../apollo-client'; import {usePermissionsForLocation} from '../app/Permissions'; import {InstigationStatus, SensorType} from '../graphql/types'; import {TimeFromNow} from '../ui/TimeFromNow'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/snapshots/SnapshotNav.tsx b/js_modules/dagster-ui/packages/ui-core/src/snapshots/SnapshotNav.tsx index 76ffecb3baede..21838792a8c66 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/snapshots/SnapshotNav.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/snapshots/SnapshotNav.tsx @@ -1,8 +1,8 @@ -import {gql, useQuery} from '@apollo/client'; import {FontFamily, Heading, PageHeader, Tabs, Tag} from '@dagster-io/ui-components'; import {Link} from 'react-router-dom'; import {SnapshotQuery, SnapshotQueryVariables} from './types/SnapshotNav.types'; +import {gql, useQuery} from '../apollo-client'; import {useBlockTraceOnQueryResult} from '../performance/TraceContext'; import {ExplorerPath, explorerPathToString} from '../pipelines/PipelinePathUtils'; import {TabLink} from '../ui/TabLink'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/testing/ApolloTestProvider.tsx b/js_modules/dagster-ui/packages/ui-core/src/testing/ApolloTestProvider.tsx index 6664ee2ca06c6..34ecec7f28eb4 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/testing/ApolloTestProvider.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/testing/ApolloTestProvider.tsx @@ -1,4 +1,3 @@ -import {ApolloClient, ApolloProvider, DocumentNode} from '@apollo/client'; import {SchemaLink} from '@apollo/client/link/schema'; import {mergeResolvers} from '@graphql-tools/merge'; import {addMocksToSchema} from '@graphql-tools/mock'; @@ -6,6 +5,7 @@ import {makeExecutableSchema} from '@graphql-tools/schema'; import * as React from 'react'; import {defaultMocks} from './defaultMocks'; +import {ApolloClient, ApolloProvider, DocumentNode} from '../apollo-client'; import {createAppCache} from '../app/AppCache'; export interface ApolloTestProps { diff --git a/js_modules/dagster-ui/packages/ui-core/src/testing/MockedApolloLinks.tsx b/js_modules/dagster-ui/packages/ui-core/src/testing/MockedApolloLinks.tsx index 352d47c312bb9..a2e1ae10c24e8 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/testing/MockedApolloLinks.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/testing/MockedApolloLinks.tsx @@ -1,4 +1,4 @@ -import {GraphQLRequest} from '@apollo/client'; +import {GraphQLRequest} from '../apollo-client'; export interface CachedGraphQLRequest extends GraphQLRequest { name: string; diff --git a/js_modules/dagster-ui/packages/ui-core/src/testing/__tests__/ApolloTestProvider.test.tsx b/js_modules/dagster-ui/packages/ui-core/src/testing/__tests__/ApolloTestProvider.test.tsx index c5259331960b6..636d85e8415a0 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/testing/__tests__/ApolloTestProvider.test.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/testing/__tests__/ApolloTestProvider.test.tsx @@ -1,7 +1,7 @@ -import {useQuery} from '@apollo/client'; import {render, screen} from '@testing-library/react'; import {loader} from 'graphql.macro'; +import {useQuery} from '../../apollo-client'; import {INSTANCE_CONFIG_QUERY} from '../../instance/InstanceConfig'; import { InstanceConfigQuery, diff --git a/js_modules/dagster-ui/packages/ui-core/src/testing/mocking.ts b/js_modules/dagster-ui/packages/ui-core/src/testing/mocking.ts index 52082a9f16a04..d23d5d2da600c 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/testing/mocking.ts +++ b/js_modules/dagster-ui/packages/ui-core/src/testing/mocking.ts @@ -1,8 +1,9 @@ -import {DocumentNode, OperationVariables} from '@apollo/client'; import {MockedResponse} from '@apollo/client/testing'; import deepmerge from 'deepmerge'; import {GraphQLError} from 'graphql'; +import {DocumentNode, OperationVariables} from '../apollo-client'; + export function buildQueryMock< TQuery extends {__typename: 'Query'}, TVariables extends OperationVariables, diff --git a/js_modules/dagster-ui/packages/ui-core/src/ticks/EvaluateScheduleDialog.tsx b/js_modules/dagster-ui/packages/ui-core/src/ticks/EvaluateScheduleDialog.tsx index 46ba27c6930e9..04a7d9ca99fd6 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/ticks/EvaluateScheduleDialog.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/ticks/EvaluateScheduleDialog.tsx @@ -1,4 +1,3 @@ -import {gql, useMutation, useQuery} from '@apollo/client'; import { Box, Button, @@ -28,6 +27,7 @@ import { ScheduleDryRunMutation, ScheduleDryRunMutationVariables, } from './types/EvaluateScheduleDialog.types'; +import {gql, useMutation, useQuery} from '../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {PythonErrorInfo} from '../app/PythonErrorInfo'; import {TimeContext} from '../app/time/TimeContext'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/ticks/InstigationEventLogTable.tsx b/js_modules/dagster-ui/packages/ui-core/src/ticks/InstigationEventLogTable.tsx index 04ebf4bb306e8..958c2007e4a27 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/ticks/InstigationEventLogTable.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/ticks/InstigationEventLogTable.tsx @@ -1,9 +1,9 @@ -import {gql} from '@apollo/client'; import {Box} from '@dagster-io/ui-components'; import {useVirtualizer} from '@tanstack/react-virtual'; import {useContext, useEffect, useRef} from 'react'; import {InstigationEventLogFragment} from './types/InstigationEventLogTable.types'; +import {gql} from '../apollo-client'; import {EventTypeColumn, Row as LogsRow, TimestampColumn} from '../runs/LogsRowComponents'; import { ColumnWidthsContext, diff --git a/js_modules/dagster-ui/packages/ui-core/src/ticks/RunRequestFragment.tsx b/js_modules/dagster-ui/packages/ui-core/src/ticks/RunRequestFragment.tsx index 9836a1226e94c..afca739f11f79 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/ticks/RunRequestFragment.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/ticks/RunRequestFragment.tsx @@ -1,4 +1,4 @@ -import {gql} from '@apollo/client'; +import {gql} from '../apollo-client'; export const RUN_REQUEST_FRAGMENT = gql` fragment RunRequestFragment on RunRequest { diff --git a/js_modules/dagster-ui/packages/ui-core/src/ticks/SensorDryRunDialog.tsx b/js_modules/dagster-ui/packages/ui-core/src/ticks/SensorDryRunDialog.tsx index 9769f04bb4896..728a9d42923f4 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/ticks/SensorDryRunDialog.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/ticks/SensorDryRunDialog.tsx @@ -1,4 +1,3 @@ -import {gql, useMutation} from '@apollo/client'; import { Box, Button, @@ -25,6 +24,7 @@ import { SensorDryRunMutation, SensorDryRunMutationVariables, } from './types/SensorDryRunDialog.types'; +import {gql, useMutation} from '../apollo-client'; import {showCustomAlert} from '../app/CustomAlertProvider'; import {showSharedToaster} from '../app/DomUtils'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/ticks/TickLogDialog.tsx b/js_modules/dagster-ui/packages/ui-core/src/ticks/TickLogDialog.tsx index 6b932a55b2519..db21defa39bfa 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/ticks/TickLogDialog.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/ticks/TickLogDialog.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import { Box, Button, @@ -13,6 +12,7 @@ import { import {INSTIGATION_EVENT_LOG_FRAGMENT, InstigationEventLogTable} from './InstigationEventLogTable'; import {TickLogEventsQuery, TickLogEventsQueryVariables} from './types/TickLogDialog.types'; +import {gql, useQuery} from '../apollo-client'; import {InstigationSelector} from '../graphql/types'; import {HistoryTickFragment} from '../instigation/types/InstigationUtils.types'; import {TimestampDisplay} from '../schedules/TimestampDisplay'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/ticks/__tests__/EvaluateScheduleDialog.test.tsx b/js_modules/dagster-ui/packages/ui-core/src/ticks/__tests__/EvaluateScheduleDialog.test.tsx index 5a815b8e1839c..c7970d1fba44c 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/ticks/__tests__/EvaluateScheduleDialog.test.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/ticks/__tests__/EvaluateScheduleDialog.test.tsx @@ -1,8 +1,8 @@ -import {Resolvers} from '@apollo/client'; import {MockedProvider, MockedResponse} from '@apollo/client/testing'; import {render, screen, waitFor} from '@testing-library/react'; import userEvent from '@testing-library/user-event'; +import {Resolvers} from '../../apollo-client'; import {EvaluateScheduleDialog} from '../EvaluateScheduleDialog'; import { GetScheduleQueryMock, diff --git a/js_modules/dagster-ui/packages/ui-core/src/ticks/__tests__/SensorDryRunDialog.test.tsx b/js_modules/dagster-ui/packages/ui-core/src/ticks/__tests__/SensorDryRunDialog.test.tsx index ee32bda180c92..5972b015f2f43 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/ticks/__tests__/SensorDryRunDialog.test.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/ticks/__tests__/SensorDryRunDialog.test.tsx @@ -1,8 +1,8 @@ -import {Resolvers} from '@apollo/client'; import {MockedProvider, MockedResponse} from '@apollo/client/testing'; import {render, screen, waitFor} from '@testing-library/react'; import userEvent from '@testing-library/user-event'; +import {Resolvers} from '../../apollo-client'; import {SensorDryRunDialog} from '../SensorDryRunDialog'; import * as Mocks from '../__fixtures__/SensorDryRunDialog.fixtures'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/typeexplorer/ConfigTypeSchema.tsx b/js_modules/dagster-ui/packages/ui-core/src/typeexplorer/ConfigTypeSchema.tsx index ae21e742a27a3..28af0f2d5fe12 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/typeexplorer/ConfigTypeSchema.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/typeexplorer/ConfigTypeSchema.tsx @@ -1,4 +1,4 @@ -import {gql} from '@apollo/client'; +import {gql} from '../apollo-client'; export const CONFIG_TYPE_SCHEMA_FRAGMENT = gql` fragment ConfigTypeSchemaFragment on ConfigType { diff --git a/js_modules/dagster-ui/packages/ui-core/src/typeexplorer/TypeExplorer.tsx b/js_modules/dagster-ui/packages/ui-core/src/typeexplorer/TypeExplorer.tsx index f9c31ceb71154..fdf7a37c266dc 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/typeexplorer/TypeExplorer.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/typeexplorer/TypeExplorer.tsx @@ -1,9 +1,9 @@ -import {gql} from '@apollo/client'; import {Box, ConfigTypeSchema} from '@dagster-io/ui-components'; import {Link} from 'react-router-dom'; import {CONFIG_TYPE_SCHEMA_FRAGMENT} from './ConfigTypeSchema'; import {TypeExplorerFragment} from './types/TypeExplorer.types'; +import {gql} from '../apollo-client'; import {gqlTypePredicate} from '../app/Util'; import {dagsterTypeKind} from '../dagstertype/DagsterType'; import {METADATA_ENTRY_FRAGMENT} from '../metadata/MetadataEntryFragment'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/typeexplorer/TypeExplorerContainer.tsx b/js_modules/dagster-ui/packages/ui-core/src/typeexplorer/TypeExplorerContainer.tsx index 5bc0f833217ef..785ceb6008790 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/typeexplorer/TypeExplorerContainer.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/typeexplorer/TypeExplorerContainer.tsx @@ -1,10 +1,9 @@ -import {gql, useQuery} from '@apollo/client'; - import {TYPE_EXPLORER_FRAGMENT, TypeExplorer} from './TypeExplorer'; import { TypeExplorerContainerQuery, TypeExplorerContainerQueryVariables, } from './types/TypeExplorerContainer.types'; +import {gql, useQuery} from '../apollo-client'; import {ExplorerPath} from '../pipelines/PipelinePathUtils'; import {Loading} from '../ui/Loading'; import {buildPipelineSelector} from '../workspace/WorkspaceContext'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/typeexplorer/TypeList.tsx b/js_modules/dagster-ui/packages/ui-core/src/typeexplorer/TypeList.tsx index ee452a18709d8..327cd88856552 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/typeexplorer/TypeList.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/typeexplorer/TypeList.tsx @@ -1,9 +1,9 @@ -import {gql} from '@apollo/client'; import {Box, Colors} from '@dagster-io/ui-components'; import styled from 'styled-components'; import {DAGSTER_TYPE_WITH_TOOLTIP_FRAGMENT, TypeWithTooltip} from './TypeWithTooltip'; import {TypeListFragment} from './types/TypeList.types'; +import {gql} from '../apollo-client'; import {SidebarSection, SidebarSubhead, SidebarTitle} from '../pipelines/SidebarComponents'; interface ITypeListProps { diff --git a/js_modules/dagster-ui/packages/ui-core/src/typeexplorer/TypeListContainer.tsx b/js_modules/dagster-ui/packages/ui-core/src/typeexplorer/TypeListContainer.tsx index 77cc15045c8d4..f1c3117a2344c 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/typeexplorer/TypeListContainer.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/typeexplorer/TypeListContainer.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import {Box, NonIdealState} from '@dagster-io/ui-components'; import {useMemo} from 'react'; @@ -7,6 +6,7 @@ import { TypeListContainerQuery, TypeListContainerQueryVariables, } from './types/TypeListContainer.types'; +import {gql, useQuery} from '../apollo-client'; import {useBlockTraceOnQueryResult} from '../performance/TraceContext'; import {ExplorerPath} from '../pipelines/PipelinePathUtils'; import {Loading} from '../ui/Loading'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/typeexplorer/TypeWithTooltip.tsx b/js_modules/dagster-ui/packages/ui-core/src/typeexplorer/TypeWithTooltip.tsx index 2f9c53161d812..5ab6582a83de1 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/typeexplorer/TypeWithTooltip.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/typeexplorer/TypeWithTooltip.tsx @@ -1,8 +1,9 @@ -import {gql} from '@apollo/client'; import {Colors} from '@dagster-io/ui-components'; import {Link} from 'react-router-dom'; import styled from 'styled-components'; +import {gql} from '../apollo-client'; + interface ITypeWithTooltipProps { type: { name: string | null; diff --git a/js_modules/dagster-ui/packages/ui-core/src/ui/Loading.tsx b/js_modules/dagster-ui/packages/ui-core/src/ui/Loading.tsx index 48283fe7a8815..b8cc50f77224f 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/ui/Loading.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/ui/Loading.tsx @@ -1,7 +1,7 @@ -import {ApolloError, QueryResult} from '@apollo/client'; import {Box, NonIdealState, Spinner} from '@dagster-io/ui-components'; import * as React from 'react'; +import {ApolloError, QueryResult} from '../apollo-client'; import {ERROR_CODES_TO_SURFACE, errorCodeToMessage} from '../app/HTTPErrorCodes'; interface ILoadingProps { diff --git a/js_modules/dagster-ui/packages/ui-core/src/workspace/GraphRoot.tsx b/js_modules/dagster-ui/packages/ui-core/src/workspace/GraphRoot.tsx index 1170f4d52447e..ee190ef1d2d1a 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/workspace/GraphRoot.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/workspace/GraphRoot.tsx @@ -1,10 +1,10 @@ -import {gql, useQuery} from '@apollo/client'; import {Box, Heading, NonIdealState, PageHeader, Tag} from '@dagster-io/ui-components'; import {useState} from 'react'; import {useHistory, useParams} from 'react-router-dom'; import {RepoAddress} from './types'; import {GraphExplorerRootQuery, GraphExplorerRootQueryVariables} from './types/GraphRoot.types'; +import {gql, useQuery} from '../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {useTrackPageView} from '../app/analytics'; import {useDocumentTitle} from '../hooks/useDocumentTitle'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/workspace/RepositoryInformation.tsx b/js_modules/dagster-ui/packages/ui-core/src/workspace/RepositoryInformation.tsx index 9dd75e2b19390..4489c37ebb556 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/workspace/RepositoryInformation.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/workspace/RepositoryInformation.tsx @@ -1,5 +1,4 @@ -import {gql} from '@apollo/client'; - +import {gql} from '../apollo-client'; import {InstigationStateFragment} from '../instigation/types/InstigationUtils.types'; export const REPOSITORY_INFO_FRAGMENT = gql` diff --git a/js_modules/dagster-ui/packages/ui-core/src/workspace/VirtualizedAssetRow.tsx b/js_modules/dagster-ui/packages/ui-core/src/workspace/VirtualizedAssetRow.tsx index 168042d12f4c3..44736e86277f9 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/workspace/VirtualizedAssetRow.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/workspace/VirtualizedAssetRow.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import {Box, Caption, Checkbox, Colors, Icon} from '@dagster-io/ui-components'; import * as React from 'react'; import {Link} from 'react-router-dom'; @@ -10,6 +9,7 @@ import { SingleNonSdaAssetQueryVariables, } from './types/VirtualizedAssetRow.types'; import {workspacePathFromAddress} from './workspacePath'; +import {gql, useQuery} from '../apollo-client'; import {useAssetsLiveData} from '../asset-data/AssetLiveDataProvider'; import {buildAssetNodeStatusContent} from '../asset-graph/AssetNodeStatusContent'; import {AssetRunLink} from '../asset-graph/AssetRunLinking'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/workspace/VirtualizedGraphTable.tsx b/js_modules/dagster-ui/packages/ui-core/src/workspace/VirtualizedGraphTable.tsx index 2ab1db4aa71c4..a4eae6a2d0214 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/workspace/VirtualizedGraphTable.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/workspace/VirtualizedGraphTable.tsx @@ -1,4 +1,3 @@ -import {gql, useLazyQuery} from '@apollo/client'; import {Box, Caption, Colors} from '@dagster-io/ui-components'; import {useVirtualizer} from '@tanstack/react-virtual'; import {useMemo, useRef} from 'react'; @@ -9,6 +8,7 @@ import {useDelayedRowQuery} from './VirtualizedWorkspaceTable'; import {RepoAddress} from './types'; import {SingleGraphQuery, SingleGraphQueryVariables} from './types/VirtualizedGraphTable.types'; import {workspacePathFromAddress} from './workspacePath'; +import {gql, useLazyQuery} from '../apollo-client'; import {useBlockTraceOnQueryResult} from '../performance/TraceContext'; import {Container, HeaderCell, HeaderRow, Inner, Row, RowCell} from '../ui/VirtualizedTable'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/workspace/VirtualizedJobRow.tsx b/js_modules/dagster-ui/packages/ui-core/src/workspace/VirtualizedJobRow.tsx index de8bb066dfeb1..5a83bbb23d811 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/workspace/VirtualizedJobRow.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/workspace/VirtualizedJobRow.tsx @@ -1,4 +1,3 @@ -import {gql, useLazyQuery} from '@apollo/client'; import {Box, MiddleTruncate} from '@dagster-io/ui-components'; import {useMemo} from 'react'; import {Link} from 'react-router-dom'; @@ -9,6 +8,7 @@ import {buildPipelineSelector} from './WorkspaceContext'; import {RepoAddress} from './types'; import {SingleJobQuery, SingleJobQueryVariables} from './types/VirtualizedJobRow.types'; import {workspacePathFromAddress} from './workspacePath'; +import {gql, useLazyQuery} from '../apollo-client'; import {FIFTEEN_SECONDS, useQueryRefreshAtInterval} from '../app/QueryRefresh'; import {JobMenu} from '../instance/JobMenu'; import {LastRunSummary} from '../instance/LastRunSummary'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/workspace/VirtualizedScheduleRow.tsx b/js_modules/dagster-ui/packages/ui-core/src/workspace/VirtualizedScheduleRow.tsx index 4e6a2a611f6ca..4a509f1dc64a1 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/workspace/VirtualizedScheduleRow.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/workspace/VirtualizedScheduleRow.tsx @@ -1,4 +1,3 @@ -import {gql, useLazyQuery} from '@apollo/client'; import { Box, Button, @@ -23,6 +22,7 @@ import { SingleScheduleQueryVariables, } from './types/VirtualizedScheduleRow.types'; import {workspacePathFromAddress} from './workspacePath'; +import {gql, useLazyQuery} from '../apollo-client'; import {FIFTEEN_SECONDS, useQueryRefreshAtInterval} from '../app/QueryRefresh'; import {AutomationTargetList} from '../automation/AutomationTargetList'; import {InstigationStatus} from '../graphql/types'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/workspace/VirtualizedSensorRow.tsx b/js_modules/dagster-ui/packages/ui-core/src/workspace/VirtualizedSensorRow.tsx index bbb630890ce71..bd0d43c0ca2f2 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/workspace/VirtualizedSensorRow.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/workspace/VirtualizedSensorRow.tsx @@ -1,4 +1,3 @@ -import {gql, useLazyQuery} from '@apollo/client'; import { Box, Caption, @@ -17,6 +16,7 @@ import {LoadingOrNone, useDelayedRowQuery} from './VirtualizedWorkspaceTable'; import {RepoAddress} from './types'; import {SingleSensorQuery, SingleSensorQueryVariables} from './types/VirtualizedSensorRow.types'; import {workspacePathFromAddress} from './workspacePath'; +import {gql, useLazyQuery} from '../apollo-client'; import {FIFTEEN_SECONDS, useQueryRefreshAtInterval} from '../app/QueryRefresh'; import {AutomationTargetList} from '../automation/AutomationTargetList'; import {InstigationStatus, SensorType} from '../graphql/types'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/workspace/VirtualizedWorkspaceTable.tsx b/js_modules/dagster-ui/packages/ui-core/src/workspace/VirtualizedWorkspaceTable.tsx index a40692b8ec1ba..14fcae4ec94f0 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/workspace/VirtualizedWorkspaceTable.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/workspace/VirtualizedWorkspaceTable.tsx @@ -1,10 +1,10 @@ -import {QueryResult} from '@apollo/client'; import {Caption, Colors} from '@dagster-io/ui-components'; import * as React from 'react'; import {forwardRef} from 'react'; import styled from 'styled-components'; import {RepoAddress} from './types'; +import {QueryResult} from '../apollo-client'; import {CompletionType, useTraceDependency} from '../performance/TraceContext'; import {RepoSectionHeader} from '../runs/RepoSectionHeader'; import {Row} from '../ui/VirtualizedTable'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceAssetsQuery.tsx b/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceAssetsQuery.tsx index 517e458267427..4ed97f24b5f0d 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceAssetsQuery.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceAssetsQuery.tsx @@ -1,5 +1,4 @@ -import {gql} from '@apollo/client'; - +import {gql} from '../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {ASSET_TABLE_DEFINITION_FRAGMENT} from '../assets/AssetTableFragment'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceAssetsRoot.tsx b/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceAssetsRoot.tsx index c944d15df60c8..1b8dbb2b3c53f 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceAssetsRoot.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceAssetsRoot.tsx @@ -1,4 +1,3 @@ -import {useQuery} from '@apollo/client'; import {Box, Colors, NonIdealState, Spinner, TextInput} from '@dagster-io/ui-components'; import {useMemo} from 'react'; @@ -12,6 +11,7 @@ import { WorkspaceAssetsQuery, WorkspaceAssetsQueryVariables, } from './types/WorkspaceAssetsQuery.types'; +import {useQuery} from '../apollo-client'; import {FIFTEEN_SECONDS, useQueryRefreshAtInterval} from '../app/QueryRefresh'; import {useTrackPageView} from '../app/analytics'; import {useAssetSearch} from '../assets/useAssetSearch'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceContext.tsx b/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceContext.tsx index 5024ff301c43b..0e816b9ab3c96 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceContext.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceContext.tsx @@ -1,4 +1,3 @@ -import {useApolloClient} from '@apollo/client'; import sortBy from 'lodash/sortBy'; import React, {useCallback, useContext, useLayoutEffect, useMemo, useRef, useState} from 'react'; import {useSetRecoilState} from 'recoil'; @@ -18,6 +17,7 @@ import { WorkspaceScheduleFragment, WorkspaceSensorFragment, } from './types/WorkspaceQueries.types'; +import {useApolloClient} from '../apollo-client'; import {AppContext} from '../app/AppContext'; import {useRefreshAtInterval} from '../app/QueryRefresh'; import {PythonErrorFragment} from '../app/types/PythonErrorFragment.types'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceGraphsQuery.tsx b/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceGraphsQuery.tsx index bf19e91bd2178..687febb25ff14 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceGraphsQuery.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceGraphsQuery.tsx @@ -1,5 +1,4 @@ -import {gql} from '@apollo/client'; - +import {gql} from '../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; const REPOSITORY_GRAPHS_FRAGMENT = gql` diff --git a/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceGraphsRoot.tsx b/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceGraphsRoot.tsx index bea46379a0f46..c5acc6bb8875f 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceGraphsRoot.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceGraphsRoot.tsx @@ -1,4 +1,3 @@ -import {useQuery} from '@apollo/client'; import {Box, Colors, NonIdealState, Spinner, TextInput} from '@dagster-io/ui-components'; import {useMemo} from 'react'; @@ -13,6 +12,7 @@ import { WorkspaceGraphsQuery, WorkspaceGraphsQueryVariables, } from './types/WorkspaceGraphsQuery.types'; +import {useQuery} from '../apollo-client'; import {FIFTEEN_SECONDS, useQueryRefreshAtInterval} from '../app/QueryRefresh'; import {useTrackPageView} from '../app/analytics'; import {useDocumentTitle} from '../hooks/useDocumentTitle'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceJobsRoot.tsx b/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceJobsRoot.tsx index b3f97e5552757..f67929b5361ed 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceJobsRoot.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceJobsRoot.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import {Box, Colors, NonIdealState, Spinner, TextInput} from '@dagster-io/ui-components'; import {useMemo} from 'react'; @@ -9,6 +8,7 @@ import {repoAddressAsHumanString} from './repoAddressAsString'; import {repoAddressToSelector} from './repoAddressToSelector'; import {RepoAddress} from './types'; import {WorkspaceJobsQuery, WorkspaceJobsQueryVariables} from './types/WorkspaceJobsRoot.types'; +import {gql, useQuery} from '../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {FIFTEEN_SECONDS, useQueryRefreshAtInterval} from '../app/QueryRefresh'; import {useTrackPageView} from '../app/analytics'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceQueries.tsx b/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceQueries.tsx index 024b551be243a..cd78c2dc76349 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceQueries.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceQueries.tsx @@ -1,6 +1,5 @@ -import {gql} from '@apollo/client'; - import {REPOSITORY_INFO_FRAGMENT} from './RepositoryInformation'; +import {gql} from '../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {BASIC_INSTIGATION_STATE_FRAGMENT} from '../overview/BasicInstigationStateFragment'; import {RESOURCE_ENTRY_FRAGMENT} from '../resources/WorkspaceResourcesRoot'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceSchedulesRoot.tsx b/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceSchedulesRoot.tsx index 59a7632b1a581..bd5d8db6fc909 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceSchedulesRoot.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceSchedulesRoot.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import {Box, Colors, NonIdealState, Spinner, TextInput, Tooltip} from '@dagster-io/ui-components'; import {useMemo} from 'react'; @@ -12,6 +11,7 @@ import { WorkspaceSchedulesQuery, WorkspaceSchedulesQueryVariables, } from './types/WorkspaceSchedulesRoot.types'; +import {gql, useQuery} from '../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {FIFTEEN_SECONDS, useQueryRefreshAtInterval} from '../app/QueryRefresh'; import {useTrackPageView} from '../app/analytics'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceSensorsRoot.tsx b/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceSensorsRoot.tsx index 1a9a3c3f33096..879d3aec89a95 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceSensorsRoot.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceSensorsRoot.tsx @@ -1,4 +1,3 @@ -import {gql, useQuery} from '@apollo/client'; import {Box, Colors, NonIdealState, Spinner, TextInput, Tooltip} from '@dagster-io/ui-components'; import {useMemo} from 'react'; @@ -12,6 +11,7 @@ import { WorkspaceSensorsQuery, WorkspaceSensorsQueryVariables, } from './types/WorkspaceSensorsRoot.types'; +import {gql, useQuery} from '../apollo-client'; import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment'; import {FIFTEEN_SECONDS, useQueryRefreshAtInterval} from '../app/QueryRefresh'; import {useTrackPageView} from '../app/analytics';