feat(): enable custom domain usage (#9911)
# Content - Introduce the `workspaceUrls` property. It contains two sub-properties: `customUrl, subdomainUrl`. These endpoints are used to access the workspace. Even if the `workspaceUrls` is invalid for multiple reasons, the `subdomainUrl` remains valid. - Introduce `ResolveField` workspaceEndpoints to avoid unnecessary URL computation on the frontend part. - Add a `forceSubdomainUrl` to avoid custom URL using a query parameter
This commit is contained in:
@ -159,6 +159,10 @@ export const queries = {
|
||||
subdomain
|
||||
hasValidEnterpriseKey
|
||||
hostname
|
||||
workspaceUrls {
|
||||
subdomainUrl
|
||||
customUrl
|
||||
}
|
||||
featureFlags {
|
||||
id
|
||||
key
|
||||
@ -183,6 +187,11 @@ export const queries = {
|
||||
logo
|
||||
displayName
|
||||
subdomain
|
||||
hostname
|
||||
workspaceUrls {
|
||||
subdomainUrl
|
||||
customUrl
|
||||
}
|
||||
}
|
||||
}
|
||||
userVars
|
||||
@ -309,6 +318,10 @@ export const responseData = {
|
||||
isPasswordAuthEnabled: true,
|
||||
subdomain: 'test',
|
||||
hostname: null,
|
||||
workspaceUrls: {
|
||||
customUrl: undefined,
|
||||
subdomainUrl: 'https://test.twenty.com/',
|
||||
},
|
||||
featureFlags: [],
|
||||
metadataVersion: 1,
|
||||
currentBillingSubscription: null,
|
||||
|
||||
@ -27,6 +27,10 @@ const Wrapper = getJestMetadataAndApolloMocksWrapper({
|
||||
isGoogleAuthEnabled: true,
|
||||
isMicrosoftAuthEnabled: false,
|
||||
isPasswordAuthEnabled: true,
|
||||
workspaceUrls: {
|
||||
subdomainUrl: 'https://twenty.twenty.com',
|
||||
customUrl: 'https://my-custom-domain.com',
|
||||
},
|
||||
currentBillingSubscription: {
|
||||
id: '1',
|
||||
interval: SubscriptionInterval.Month,
|
||||
|
||||
Reference in New Issue
Block a user