Prevent querying too much on worklow index page (#14916)
## Performance short term fix Done in this PR: workflowVersions and workflowRuns are heavy object. I'm preventing loading their data when they are loaded as relations. This will reduce the work on backend ## Long term fix Todo: We should make sure workflow data is ligher
This commit is contained in:
@@ -10,6 +10,7 @@ import { isDefined } from 'twenty-shared/utils';
|
||||
export const useWorkflowWithCurrentVersion = (
|
||||
workflowId: string | undefined,
|
||||
): WorkflowWithCurrentVersion | undefined => {
|
||||
// TODO: we should only load the data for the current version
|
||||
const { record: workflow } = useFindOneRecord<Workflow>({
|
||||
objectNameSingular: CoreObjectNameSingular.Workflow,
|
||||
objectRecordId: workflowId,
|
||||
|
||||
Reference in New Issue
Block a user