Add entitySchemas to workspace context and cache (#15966)

This commit is contained in:
Weiko
2025-11-21 15:07:46 +01:00
committed by GitHub
parent f77fcdcc63
commit a21d58f43d
4 changed files with 61 additions and 114 deletions
@@ -1,6 +1,7 @@
import { AsyncLocalStorage } from 'async_hooks';
import { type ObjectsPermissionsByRoleId } from 'twenty-shared/types';
import { type EntitySchema } from 'typeorm';
import { type WorkspaceAuthContext } from 'src/engine/api/common/interfaces/workspace-auth-context.interface';
@@ -13,6 +14,7 @@ export type WorkspaceContext = {
metadataVersion: number;
featureFlagsMap: Record<FeatureFlagKey, boolean>;
permissionsPerRoleId: ObjectsPermissionsByRoleId;
entitySchemas: EntitySchema[];
};
export const workspaceContextStorage =