forked from twentyhq/twenty
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix timelineActivity updated fields (twentyhq#6494)
## Context We recently introduced the new twenty ORM and used it in the update methods in the query runner. Initially we were using pg_graphql to fetch the record before updating it allowing us to compare the before and the after and create a diff. This diff is then used for the timeline activity creation. Now, twentyORM is doing the fetch and pg_graphql is still doing the update and their responses are not exactly the same, which means the diff is not working as intended (e.g date types were always in the diff due to one being in Date format and the other as a string) This PR introduces a updatedFields property to the update event which comes from the input. This is not ideal as this won't work for API users that send the whole payload but will be sufficient enough for our FE that only sends modified fields. We then compare only those fields in the diff.
- Loading branch information
Showing
5 changed files
with
23 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 15 additions & 12 deletions
27
...twenty-server/src/engine/integrations/event-emitter/utils/object-record-changed-values.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters