useDestinationInformation() — supabase Function Reference
Architecture documentation for the useDestinationInformation() function in useDestinationInformation.ts from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD ad7996f0_8f4c_16e7_8b83_e7a2b844257a["useDestinationInformation()"] 5e1e75ab_01c8_c6ad_e6b7_8db861ff91e9["DestinationPanel()"] 5e1e75ab_01c8_c6ad_e6b7_8db861ff91e9 -->|calls| ad7996f0_8f4c_16e7_8b83_e7a2b844257a c530b360_5932_907a_39fb_2183b23e371a["DestinationTypeSelection()"] c530b360_5932_907a_39fb_2183b23e371a -->|calls| ad7996f0_8f4c_16e7_8b83_e7a2b844257a 39b822e5_1e9c_b1af_0ea3_a181423b6554["DestinationRow()"] 39b822e5_1e9c_b1af_0ea3_a181423b6554 -->|calls| ad7996f0_8f4c_16e7_8b83_e7a2b844257a 956d5adf_cba4_5df0_318e_1cd418cb5f89["getStatusName()"] ad7996f0_8f4c_16e7_8b83_e7a2b844257a -->|calls| 956d5adf_cba4_5df0_318e_1cd418cb5f89 style ad7996f0_8f4c_16e7_8b83_e7a2b844257a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/studio/components/interfaces/Database/Replication/useDestinationInformation.ts lines 10–75
export const useDestinationInformation = ({ id }: { id?: number | null }) => {
const { ref: projectRef } = useParams()
const { data: sourcesData, isSuccess: isSourcesSuccess } = useReplicationSourcesQuery({
projectRef,
})
const sourceId = sourcesData?.sources.find((s) => s.name === projectRef)?.id
const replicationNotEnabled = isSourcesSuccess && !sourceId
const {
data: destination,
error: destinationError,
isPending: isDestinationPending,
isError: isDestinationError,
isSuccess: isDestinationSuccess,
} = useReplicationDestinationByIdQuery({
projectRef,
destinationId: id,
})
const destinationType: DestinationType | undefined = !destination
? undefined
: 'big_query' in destination.config
? 'BigQuery'
: 'iceberg' in destination.config
? 'Analytics Bucket'
: undefined
const {
data: pipelinesData,
error: pipelineError,
isPending: isPipelinePending,
isError: isPipelineError,
isSuccess: isPipelineSuccess,
} = useReplicationPipelinesQuery({ projectRef })
const pipeline = pipelinesData?.pipelines.find((p) => p.destination_id === id)
const { data: pipelineStatus } = useReplicationPipelineStatusQuery({
projectRef,
pipelineId: pipeline?.id,
})
const statusName = getStatusName(pipelineStatus?.status)
return {
sourceId,
destination,
pipeline,
pipelineStatus,
// Derivatives
statusName,
type: destinationType,
replicationNotEnabled,
// Data fetching status (Secondary information)
pipelineFetcher: {
error: pipelineError,
isPending: isPipelinePending,
isError: isPipelineError,
isSuccess: isPipelineSuccess,
},
destinationFetcher: {
error: destinationError,
isPending: isDestinationPending,
isError: isDestinationError,
isSuccess: isDestinationSuccess,
},
}
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does useDestinationInformation() do?
useDestinationInformation() is a function in the supabase codebase.
What does useDestinationInformation() call?
useDestinationInformation() calls 1 function(s): getStatusName.
What calls useDestinationInformation()?
useDestinationInformation() is called by 3 function(s): DestinationPanel, DestinationRow, DestinationTypeSelection.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free