Skip to main content

duplicateForecastScenario

Deep-copy a scenario (including all child rows) into a new scenario.

Concurrency: serialized via scenario-row locks taken by get_scenarios_for_household_for_update (matches delete_forecast_scenario and reorder_forecast_scenarios), so the cap check, scenario insert, and child copies all run while no other forecast write can interleave for the same household. Returns the newly created scenario so the client can render it without an extra round-trip.

duplicateForecastScenario(
input: DuplicateForecastScenarioInput!
): DuplicateForecastScenarioMutation

Arguments​

duplicateForecastScenario.input ● DuplicateForecastScenarioInput! non-null input​

Type​

DuplicateForecastScenarioMutation object​

Deep-copy a scenario (including all child rows) into a new scenario.

Concurrency: serialized via scenario-row locks taken by get_scenarios_for_household_for_update (matches delete_forecast_scenario and reorder_forecast_scenarios), so the cap check, scenario insert, and child copies all run while no other forecast write can interleave for the same household. Returns the newly created scenario so the client can render it without an extra round-trip.