Skip to main content

createForecastScenario

Create a new fully-initialized non-duplicate forecast scenario.

Concurrency: serialized by service-layer lock pairing: lock_household_for_scenario_writes acquires a household-row lock, then get_scenarios_for_household_for_update acquires scenario-row locks. This covers the zero-scenario case (where scenario-row locks alone would lock nothing), so cap check, order assignment, and child population run while no other forecast write can interleave for the same household. Requires forecast to be initialized first (baseline scenario already exists). Returns the newly created scenario so the client can render it without an extra round-trip.

createForecastScenario(
input: CreateForecastScenarioInput!
): CreateForecastScenarioMutation

Arguments​

createForecastScenario.input ● CreateForecastScenarioInput! non-null input​

Type​

CreateForecastScenarioMutation object​

Create a new fully-initialized non-duplicate forecast scenario.

Concurrency: serialized by service-layer lock pairing: lock_household_for_scenario_writes acquires a household-row lock, then get_scenarios_for_household_for_update acquires scenario-row locks. This covers the zero-scenario case (where scenario-row locks alone would lock nothing), so cap check, order assignment, and child population run while no other forecast write can interleave for the same household. Requires forecast to be initialized first (baseline scenario already exists). Returns the newly created scenario so the client can render it without an extra round-trip.