@@ -62,18 +62,18 @@ export async function sendMapRepoAndFinishProjectCreationReq(jwt: string, id: st
6262export 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