( workspaceId: string, scope: WorkflowQueryScope = 'active' )
| 8 | * Reads workflow metadata for a workspace directly from the React Query cache. |
| 9 | */ |
| 10 | export function getWorkflows( |
| 11 | workspaceId: string, |
| 12 | scope: WorkflowQueryScope = 'active' |
| 13 | ): WorkflowMetadata[] { |
| 14 | return ( |
| 15 | getQueryClient().getQueryData<WorkflowMetadata[]>(workflowKeys.list(workspaceId, scope)) ?? |
| 16 | EMPTY_WORKFLOWS |
| 17 | ) |
| 18 | } |
| 19 | |
| 20 | /** |
| 21 | * Reads a single workflow by id from the React Query cache. |
no test coverage detected