feat(gql-client): deployment removal request

This commit is contained in:
Eric Lewis 2024-03-27 12:58:56 -04:00 committed by Nabarun
parent 953c3fc10b
commit a8d93732ce
3 changed files with 21 additions and 0 deletions

View File

@ -276,6 +276,17 @@ export class GQLClient {
return data;
}
async deleteDeployment (deploymentId: string): Promise<types.DeleteDeploymentResponse> {
const { data } = await this.client.mutate({
mutation: mutations.deleteDeployment,
variables: {
deploymentId
}
});
return data;
}
async addDomain (projectId: string, data: types.AddDomainInput): Promise<types.AddDomainResponse> {
const result = await this.client.mutate({
mutation: mutations.addDomain,

View File

@ -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)

View File

@ -269,6 +269,10 @@ export type RollbackDeploymentResponse = {
rollbackDeployment: boolean
}
export type DeleteDeploymentResponse = {
deleteDeployment: boolean
}
export type AddDomainInput = {
name: string
}