diff --git a/packages/server/codegen.yml b/packages/server/codegen.yml index f7ae9eeda..45848709e 100644 --- a/packages/server/codegen.yml +++ b/packages/server/codegen.yml @@ -66,6 +66,7 @@ generates: Webhook: '@/modules/webhooks/helpers/graphTypes#WebhookGraphQLReturn' SmartTextEditorValue: '@/modules/core/services/richTextEditorService#SmartTextEditorValueSchema' BlobMetadata: '@/modules/blobstorage/domain/types#BlobStorageItem' + ServerWorkspacesInfo: '@/modules/core/helpers/graphTypes#GraphQLEmptyReturn' modules/cross-server-sync/graph/generated/graphql.ts: plugins: - 'typescript' diff --git a/packages/server/modules/core/graph/generated/graphql.ts b/packages/server/modules/core/graph/generated/graphql.ts index bd6a72416..1667a4754 100644 --- a/packages/server/modules/core/graph/generated/graphql.ts +++ b/packages/server/modules/core/graph/generated/graphql.ts @@ -4418,7 +4418,7 @@ export type ResolversTypes = { ServerAppListItem: ResolverTypeWrapper; ServerAutomateInfo: ResolverTypeWrapper; ServerConfiguration: ResolverTypeWrapper; - ServerInfo: ResolverTypeWrapper; + ServerInfo: ResolverTypeWrapper & { workspaces: ResolversTypes['ServerWorkspacesInfo'] }>; ServerInfoUpdateInput: ServerInfoUpdateInput; ServerInvite: ResolverTypeWrapper; ServerInviteCreateInput: ServerInviteCreateInput; @@ -4427,7 +4427,7 @@ export type ResolversTypes = { ServerRoleItem: ResolverTypeWrapper; ServerStatistics: ResolverTypeWrapper; ServerStats: ResolverTypeWrapper; - ServerWorkspacesInfo: ResolverTypeWrapper; + ServerWorkspacesInfo: ResolverTypeWrapper; SetPrimaryUserEmailInput: SetPrimaryUserEmailInput; SmartTextEditorValue: ResolverTypeWrapper; SortDirection: SortDirection; @@ -4663,7 +4663,7 @@ export type ResolversParentTypes = { ServerAppListItem: ServerAppListItem; ServerAutomateInfo: ServerAutomateInfo; ServerConfiguration: ServerConfiguration; - ServerInfo: ServerInfo; + ServerInfo: Omit & { workspaces: ResolversParentTypes['ServerWorkspacesInfo'] }; ServerInfoUpdateInput: ServerInfoUpdateInput; ServerInvite: ServerInviteGraphQLReturnType; ServerInviteCreateInput: ServerInviteCreateInput; @@ -4671,7 +4671,7 @@ export type ResolversParentTypes = { ServerRoleItem: ServerRoleItem; ServerStatistics: GraphQLEmptyReturn; ServerStats: GraphQLEmptyReturn; - ServerWorkspacesInfo: ServerWorkspacesInfo; + ServerWorkspacesInfo: GraphQLEmptyReturn; SetPrimaryUserEmailInput: SetPrimaryUserEmailInput; SmartTextEditorValue: SmartTextEditorValueSchema; Stream: StreamGraphQLReturn; diff --git a/packages/server/modules/workspaces/graph/resolvers/workspaces.ts b/packages/server/modules/workspaces/graph/resolvers/workspaces.ts index 03a515f00..28ac181a1 100644 --- a/packages/server/modules/workspaces/graph/resolvers/workspaces.ts +++ b/packages/server/modules/workspaces/graph/resolvers/workspaces.ts @@ -878,6 +878,12 @@ export = FF_WORKSPACES_MODULE_ENABLED getWorkspaceWithDomains: getWorkspaceWithDomainsFactory({ db }) })({ workspaceId, userId }) } + }, + ServerInfo: { + workspaces: () => ({}) + }, + ServerWorkspacesInfo: { + workspacesEnabled: () => true } } as Resolvers) : {} diff --git a/packages/server/modules/workspacesCore/graph/resolvers/workspacesCore.ts b/packages/server/modules/workspacesCore/graph/resolvers/workspacesCore.ts index d362d94da..e842bca8c 100644 --- a/packages/server/modules/workspacesCore/graph/resolvers/workspacesCore.ts +++ b/packages/server/modules/workspacesCore/graph/resolvers/workspacesCore.ts @@ -102,6 +102,12 @@ export = !FF_WORKSPACES_MODULE_ENABLED }, LimitedUser: { workspaceDomainPolicyCompliant: async () => null + }, + ServerInfo: { + workspaces: () => ({}) + }, + ServerWorkspacesInfo: { + workspacesEnabled: () => false } } as Resolvers) : {}