Migrate update step changes to diff (#14663)

This PR should fix optimistic rendering issues on step updates:
- compute a diff for trigger and steps on mutations
- build an util that applies that diff (built a more robust version from
https://github.com/AsyncBanana/micropatch)
- apply diff in cache
This commit is contained in:
Thomas Trompette
2025-09-23 18:41:26 +02:00
committed by GitHub
parent a5c47a60d0
commit 6ea7aea92b
31 changed files with 1545 additions and 518 deletions
@@ -837,6 +837,8 @@ export type CreateWorkflowVersionEdgeInput = {
};
export type CreateWorkflowVersionStepInput = {
/** Step ID */
id?: InputMaybe<Scalars['String']>;
/** Next step ID */
nextStepId?: InputMaybe<Scalars['UUID']>;
/** Parent step connection options */
@@ -3861,10 +3863,8 @@ export type WorkflowVersion = {
export type WorkflowVersionStepChanges = {
__typename?: 'WorkflowVersionStepChanges';
createdStep?: Maybe<WorkflowAction>;
deletedStepIds?: Maybe<Array<Scalars['String']>>;
stepsNextStepIds?: Maybe<Scalars['JSON']>;
triggerNextStepIds?: Maybe<Array<Scalars['String']>>;
stepsDiff?: Maybe<Scalars['JSON']>;
triggerDiff?: Maybe<Scalars['JSON']>;
};
export type Workspace = {