Skip to main content

DeleteForecastScenarioMutation

Soft-delete a scenario and re-pack the surviving order to 0..N.

Returns the surviving live scenarios in their post-normalize order so the client can re-render without an extra forecastScenarios round-trip. A delete always shifts every other scenario's order, so the client cannot avoid a refetch any other way.

Concurrency: the service locks the live scenario set with SELECT ... FOR UPDATE before enforcing the minimum-count guard, preventing concurrent deletes from bypassing Cannot delete your only scenario. No optimistic version field — a client targeting a scenario another session already deleted gets Scenario not found and should refetch the list.

type DeleteForecastScenarioMutation {
deleted: Boolean
deletedScenarioExternalId: ID
errors: PayloadError
scenarios: [ForecastScenarioListItemType!]
}

Fields​

DeleteForecastScenarioMutation.deleted ● Boolean scalar​

DeleteForecastScenarioMutation.deletedScenarioExternalId ● ID scalar​

DeleteForecastScenarioMutation.errors ● PayloadError object​

DeleteForecastScenarioMutation.scenarios ● [ForecastScenarioListItemType!] list object​

Returned By​

deleteForecastScenario mutation