diff --git a/packages/gql-client/src/client.ts b/packages/gql-client/src/client.ts index 74c7683..f238869 100644 --- a/packages/gql-client/src/client.ts +++ b/packages/gql-client/src/client.ts @@ -276,6 +276,17 @@ export class GQLClient { return data; } + async deleteDeployment (deploymentId: string): Promise { + const { data } = await this.client.mutate({ + mutation: mutations.deleteDeployment, + variables: { + deploymentId + } + }); + + return data; + } + async addDomain (projectId: string, data: types.AddDomainInput): Promise { const result = await this.client.mutate({ mutation: mutations.addDomain, diff --git a/packages/gql-client/src/mutations.ts b/packages/gql-client/src/mutations.ts index fd7a9c2..be8d96d 100644 --- a/packages/gql-client/src/mutations.ts +++ b/packages/gql-client/src/mutations.ts @@ -82,6 +82,12 @@ mutation ($projectId: String! ,$deploymentId: String!) { } `; +export const deleteDeployment = gql` +mutation ($deploymentId: String!) { + deleteDeployment(deploymentId: $deploymentId) +} +`; + export const addDomain = gql` mutation ($projectId: String!, $data: AddDomainInput!) { addDomain(projectId: $projectId, data: $data) diff --git a/packages/gql-client/src/types.ts b/packages/gql-client/src/types.ts index 71c44c0..786b751 100644 --- a/packages/gql-client/src/types.ts +++ b/packages/gql-client/src/types.ts @@ -269,6 +269,10 @@ export type RollbackDeploymentResponse = { rollbackDeployment: boolean } +export type DeleteDeploymentResponse = { + deleteDeployment: boolean +} + export type AddDomainInput = { name: string }