MCPcopy Index your code
hub / github.com/simstudioai/sim / getFolders

Function getFolders

apps/sim/hooks/queries/utils/folder-cache.ts:7–11  ·  view source on GitHub ↗
(workspaceId: string)

Source from the content-addressed store, hash-verified

5const EMPTY_FOLDERS: WorkflowFolder[] = []
6
7export function getFolders(workspaceId: string): WorkflowFolder[] {
8 return (
9 getQueryClient().getQueryData<WorkflowFolder[]>(folderKeys.list(workspaceId)) ?? EMPTY_FOLDERS
10 )
11}
12
13export function getFolderMap(workspaceId: string): Record<string, WorkflowFolder> {
14 return Object.fromEntries(getFolders(workspaceId).map((folder) => [folder.id, folder]))

Callers 1

getFolderMapFunction · 0.85

Calls 1

getQueryClientFunction · 0.90

Tested by

no test coverage detected