closes https://github.com/twentyhq/twenty/issues/4479 tried to catch the error inside various places including https://github.com/twentyhq/twenty/blob/main/packages/twenty-server/src/engine/integrations/exception-handler/exception-handler.service.ts but it seems like the error never reaches the GraphQL module 😮 any idea where we could intercept such an error `Cannot query field`? --------- Co-authored-by: Jérémy Magrin <jeremy.magrin@gmail.com>
23 lines
486 B
TypeScript
23 lines
486 B
TypeScript
import { createState } from 'twenty-ui';
|
|
|
|
import { Workspace } from '~/generated/graphql';
|
|
|
|
export type CurrentWorkspace = Pick<
|
|
Workspace,
|
|
| 'id'
|
|
| 'inviteHash'
|
|
| 'logo'
|
|
| 'displayName'
|
|
| 'allowImpersonation'
|
|
| 'featureFlags'
|
|
| 'subscriptionStatus'
|
|
| 'activationStatus'
|
|
| 'currentBillingSubscription'
|
|
| 'currentCacheVersion'
|
|
>;
|
|
|
|
export const currentWorkspaceState = createState<CurrentWorkspace | null>({
|
|
key: 'currentWorkspaceState',
|
|
defaultValue: null,
|
|
});
|