feat(delete): use projectScheduleDelete mutation for soft deletion (#827)

Switch from immediate `projectDelete` to `projectScheduleDelete` which
provides a 48-hour grace period before the project is permanently removed.

Made-with: Cursor
This commit is contained in:
Brody Over 2026-03-30 23:53:31 -04:00 committed by GitHub
parent 5b75f1884c
commit 898a59d63a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 8 additions and 7 deletions

View file

@ -69,11 +69,12 @@ pub async fn command(args: Args) -> Result<()> {
let spinner = create_spinner_if(!args.json, "Deleting project...".into());
let vars = mutations::project_delete::Variables {
let vars = mutations::project_schedule_delete::Variables {
id: project_id.clone(),
};
post_graphql::<mutations::ProjectDelete, _>(&client, &configs.get_backboard(), vars).await?;
post_graphql::<mutations::ProjectScheduleDelete, _>(&client, &configs.get_backboard(), vars)
.await?;
if args.json {
println!("{}", serde_json::json!({"id": project_id}));

View file

@ -36,10 +36,10 @@ pub struct ProjectCreate;
#[derive(GraphQLQuery)]
#[graphql(
schema_path = "src/gql/schema.json",
query_path = "src/gql/mutations/strings/ProjectDelete.graphql",
query_path = "src/gql/mutations/strings/ProjectScheduleDelete.graphql",
response_derives = "Debug, Serialize, Clone"
)]
pub struct ProjectDelete;
pub struct ProjectScheduleDelete;
#[derive(GraphQLQuery)]
#[graphql(

View file

@ -1,3 +0,0 @@
mutation ProjectDelete($id: String!) {
projectDelete(id: $id)
}

View file

@ -0,0 +1,3 @@
mutation ProjectScheduleDelete($id: String!) {
projectScheduleDelete(id: $id)
}