diff --git a/frontend/libs/console/legacy-ce/src/lib/Globals.ts b/frontend/libs/console/legacy-ce/src/lib/Globals.ts index 530ddda3a67..4cd4155c253 100644 --- a/frontend/libs/console/legacy-ce/src/lib/Globals.ts +++ b/frontend/libs/console/legacy-ce/src/lib/Globals.ts @@ -80,6 +80,7 @@ type CloudServerEnv = { isAdminSecretSet: boolean; luxDataHost: string; // e.g. "data.pro.hasura.io" projectID: UUID; + projectName: string; serverVersion: string; tenantID: UUID; urlPrefix: string; @@ -145,6 +146,7 @@ export type EnvVars = { cliUUID?: string; tenantID?: UUID; projectID?: UUID; + projectName?: string; cloudRootDomain?: string; herokuOAuthClientId?: string; luxDataHost?: string; @@ -209,6 +211,7 @@ const globals = { herokuOAuthClientId: window.__env?.herokuOAuthClientId, hasuraCloudTenantId: window.__env?.tenantID, hasuraCloudProjectId: window.__env?.projectID, + hasuraCloudProjectName: window.__env?.projectName, neonOAuthClientId: window.__env?.neonOAuthClientId, neonRootDomain: window.__env?.neonRootDomain, allowedLuxFeatures: window.__env?.allowedLuxFeatures || [], diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/DataSources/CreateDataSource/Neon/useNeonDatabase.ts b/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/DataSources/CreateDataSource/Neon/useNeonDatabase.ts index d77a4acb07e..8c01f1027d8 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/DataSources/CreateDataSource/Neon/useNeonDatabase.ts +++ b/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/DataSources/CreateDataSource/Neon/useNeonDatabase.ts @@ -13,8 +13,8 @@ type CreateDatabaseResponse = { }; const NEON_CREATE_DATABASE_QUERY = ` - mutation neonCreateDatabase ($projectId:uuid!) { - neonCreateDatabase (projectId: $projectId) { + mutation neonCreateDatabase ($projectId:uuid!, $projectName:String) { + neonCreateDatabase (projectId: $projectId, projectName: $projectName) { databaseUrl email envVar @@ -56,6 +56,7 @@ export function useNeonDatabase() { query: NEON_CREATE_DATABASE_QUERY, variables: { projectId: globals.hasuraCloudProjectId || '', + projectName: globals.hasuraCloudProjectName || '', }, }); }, []);