useOrgAndProjectData() — supabase Function Reference
Architecture documentation for the useOrgAndProjectData() function in useOrgAndProjectData.ts from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD 93731708_c41f_3a77_3f8a_c076523beb9a["useOrgAndProjectData()"] ba40aa21_76a9_5694_176f_5c7e7e88791e["ResourceAccess()"] ba40aa21_76a9_5694_176f_5c7e7e88791e -->|calls| 93731708_c41f_3a77_3f8a_c076523beb9a 871e24a9_af4f_d982_ab63_afb529f14e75["NewScopedTokenSheet()"] 871e24a9_af4f_d982_ab63_afb529f14e75 -->|calls| 93731708_c41f_3a77_3f8a_c076523beb9a fc0c7623_a643_3b2d_a07e_d015b593e2fb["ViewTokenSheet()"] fc0c7623_a643_3b2d_a07e_d015b593e2fb -->|calls| 93731708_c41f_3a77_3f8a_c076523beb9a style 93731708_c41f_3a77_3f8a_c076523beb9a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/studio/components/interfaces/Account/AccessTokens/hooks/useOrgAndProjectData.ts lines 9–29
export const useOrgAndProjectData = (options: UseOrgAndProjectDataOptions = {}) => {
const { enabled = true } = options
const { data: organizations = [], isLoading: isLoadingOrgs } = useOrganizationsQuery({ enabled })
const { data: projectsData, isLoading: isLoadingProjects } = useProjectsInfiniteQuery({
limit: 100,
})
const projects = useMemo(
() => projectsData?.pages.flatMap((page) => page.projects) ?? [],
[projectsData]
)
return {
organizations,
projects,
isLoadingOrgs,
isLoadingProjects,
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does useOrgAndProjectData() do?
useOrgAndProjectData() is a function in the supabase codebase.
What calls useOrgAndProjectData()?
useOrgAndProjectData() is called by 3 function(s): NewScopedTokenSheet, ResourceAccess, ViewTokenSheet.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free