mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 17:02:49 +03:00
console: Pass hasura project name as args for neon create DB mutation
[GT-381]: https://hasurahq.atlassian.net/browse/GT-381?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7409 Co-authored-by: Mohd Bilal <24944223+m-Bilal@users.noreply.github.com> Co-authored-by: Rob Dominguez <24390149+robertjdominguez@users.noreply.github.com> Co-authored-by: Nicolas Inchauspe <710410+nicoinch@users.noreply.github.com> Co-authored-by: Stefano Magni <173663+NoriSte@users.noreply.github.com> Co-authored-by: Divi <32202683+imperfect-fourth@users.noreply.github.com> Co-authored-by: paritosh-08 <85472423+paritosh-08@users.noreply.github.com> Co-authored-by: ananya-2410 <107847554+ananya-2410@users.noreply.github.com> Co-authored-by: Varun Choudhary <68095256+Varun-Choudhary@users.noreply.github.com> Co-authored-by: Philip Lykke Carlsen <358550+plcplc@users.noreply.github.com> Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com> Co-authored-by: Puru Gupta <32328846+purugupta99@users.noreply.github.com> Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com> Co-authored-by: Abhijeet Khangarot <26903230+abhi40308@users.noreply.github.com> Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com> GitOrigin-RevId: f900d38a71a4306b208bc0cf406c109c3b7c028d
This commit is contained in:
parent
a7af427d38
commit
2508b35c90
@ -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 || [],
|
||||
|
@ -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 || '',
|
||||
},
|
||||
});
|
||||
}, []);
|
||||
|
Loading…
Reference in New Issue
Block a user