Files
twenty/packages
Sonarly Claude Code 31d4e56d6b UpdateWorkflowVersionStep returns client input without valid field, violating non-nullable GraphQL schema
https://sonarly.com/issue/14051?type=bug

The `updateWorkflowVersionStep` mutation returns the raw client-provided step JSON as the GraphQL response without ensuring all non-nullable fields (specifically `valid`) are populated, causing a GraphQL serialization error.

Fix: After computing `updatedStep` from either the type-change or settings-only path, the code now creates a `normalizedUpdatedStep` that ensures the `valid` field is always populated. If the client-provided step includes `valid`, that value is used; otherwise, it falls back to `existingStep.valid` (the step stored in the database, which always has this field).

The `normalizedUpdatedStep` is used both for persisting to the database (in `updatedSteps`) and as the GraphQL return value, ensuring consistency and preventing the `Cannot return null for non-nullable field WorkflowAction.valid` error.

This follows the exact same normalization pattern previously applied for the `position` field (commit d2746d2778), addressing the same class of bug where the `updateWorkflowVersionStep` mutation returns raw client input without ensuring all non-nullable GraphQL DTO fields are populated.
2026-03-13 03:27:01 +00:00
..
2026-03-12 15:55:30 +01:00