Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

7154 deleted event is not emitted when calling destroyone #7159

Merged

Conversation

bosiraphael
Copy link
Contributor

Closes #7154

@bosiraphael bosiraphael linked an issue Sep 19, 2024 that may be closed by this pull request
@bosiraphael bosiraphael marked this pull request as ready for review September 19, 2024 16:15
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This pull request addresses the issue of deleted events not being emitted when calling the destroyOne method. Here's a summary of the key changes:

  • Implemented 'destroyed' event emission in GraphqlQueryRunnerService's destroyOne method
  • Added ObjectRecordDestroyEvent class to represent object destruction events
  • Updated multiple listeners to handle 'destroyed' events instead of 'deleted' events
  • Modified ConnectedAccountDeleteOnePreQueryHook to work with 'destroyOne' operation
  • Added support for 'destroy' operation in webhook jobs and query hooks
  • Enhanced DatabaseEventTriggerListener to process 'destroyed' events for workflow triggers

These changes ensure consistent event handling across the application when objects are destroyed, addressing the core issue described in #7154.

11 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings

@charlesBochet charlesBochet merged commit c9c2f32 into main Sep 27, 2024
6 checks passed
@charlesBochet charlesBochet deleted the 7154-deleted-event-is-not-emitted-when-calling-destroyone branch September 27, 2024 13:52
harshit078 pushed a commit to harshit078/twenty that referenced this pull request Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deleted event is not emitted when calling destroyOne
2 participants