Skip to content
This repository was archived by the owner on Aug 21, 2025. It is now read-only.

Commit 3171402

Browse files
authored
Fix API call createProjectBranchBackend -> createProjectBranchRuntime (#74)
1 parent ee47e9f commit 3171402

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/util/graphql.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,18 @@ export async function sendMapRepoAndFinishProjectCreationReq(jwt: string, id: st
6262
export async function sendCreateProjectReq(jwt: string, orgId: string, projectName: string, repoId: string, repoName: string): Promise<Project> {
6363
const slug = getSlugFromName(projectName);
6464
const query = `
65-
mutation CreateProjectBranchBackend {
66-
createProjectBranchBackend(input: {orgId: "${orgId}", clusterId: "clu-018f07d5-2446-7dbe-a766-dfab00c726de", name: "${projectName}", slug: "${slug}", repoId: "${repoId}", repoName: "${repoName}", sourceType: CUSTOM, defaultBranchName: "main"}
65+
mutation CreateProjectBranchRuntime {
66+
createProjectBranchRuntime(input: {orgId: "${orgId}", clusterId: "clu-018f07d5-2446-7dbe-a766-dfab00c726de", name: "${projectName}", slug: "${slug}", repoId: "${repoId}", repoName: "${repoName}", sourceType: CUSTOM, defaultBranchName: "main"}
6767
) {
6868
id
6969
name
7070
repoId
7171
}
7272
}`;
7373

74-
const data: any = await sendGraphQLReqToHypermode(jwt, query);
74+
const res: any = await sendGraphQLReqToHypermode(jwt, query);
7575

76-
const project: Project = data.data.createProjectBranchBackend;
76+
const project: Project = res.data.createProjectBranchRuntime;
7777

7878
return project;
7979
}
@@ -120,11 +120,11 @@ export async function sendGetRepoIdReq(jwt: string, installationId: string, gitU
120120
getUserRepoIdByUrl(installationId: "${installationId}", gitUrl: "${gitUrl}")
121121
}`;
122122

123-
const data: any = await sendGraphQLReqToHypermode(jwt, query);
123+
const res: any = await sendGraphQLReqToHypermode(jwt, query);
124124

125-
if (!data.data.getUserRepoIdByUrl) {
125+
if (!res.data.getUserRepoIdByUrl) {
126126
throw new Error("No repoId found for the given installationId and gitUrl");
127127
}
128128

129-
return data.data.getUserRepoIdByUrl;
129+
return res.data.getUserRepoIdByUrl;
130130
}

0 commit comments

Comments
 (0)