Update store on data model mutation (#18684)
- enrich SSE events with relations - remove queries from sse metadata events - on sse event, manage store - on object/field metadata changes, manage store TODO left: - fix other metadata items --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions <github-actions@twenty.com> Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@@ -12,15 +12,6 @@ export class ObjectRecordEventWithQueryIdsDTO {
|
||||
objectRecordEvent: ObjectRecordEventDTO;
|
||||
}
|
||||
|
||||
@ObjectType('MetadataEventWithQueryIds')
|
||||
export class MetadataEventWithQueryIdsDTO {
|
||||
@Field(() => [String])
|
||||
queryIds: string[];
|
||||
|
||||
@Field(() => MetadataEventDTO)
|
||||
metadataEvent: MetadataEventDTO;
|
||||
}
|
||||
|
||||
@ObjectType('EventSubscription')
|
||||
export class EventSubscriptionDTO {
|
||||
@Field(() => String)
|
||||
@@ -29,6 +20,6 @@ export class EventSubscriptionDTO {
|
||||
@Field(() => [ObjectRecordEventWithQueryIdsDTO])
|
||||
objectRecordEventsWithQueryIds: ObjectRecordEventWithQueryIdsDTO[];
|
||||
|
||||
@Field(() => [MetadataEventWithQueryIdsDTO])
|
||||
metadataEventsWithQueryIds: MetadataEventWithQueryIdsDTO[];
|
||||
@Field(() => [MetadataEventDTO])
|
||||
metadataEvents: MetadataEventDTO[];
|
||||
}
|
||||
|
||||
@@ -6,8 +6,5 @@ export type EventStreamPayload = {
|
||||
queryIds: string[];
|
||||
objectRecordEvent: ObjectRecordSubscriptionEvent;
|
||||
}[];
|
||||
metadataEventsWithQueryIds: {
|
||||
queryIds: string[];
|
||||
metadataEvent: MetadataEvent;
|
||||
}[];
|
||||
metadataEvents: MetadataEvent[];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user