twentyhq / twenty

Building a modern alternative to Salesforce, powered by the community.
https://twenty.com
Other
23.11k stars 2.42k forks source link

[Flexible-schema] Refactor gql query runner to emit api event before processing to gql types #8596

Closed Weiko closed 23 hours ago

Weiko commented 2 days ago

Fixes https://github.com/twentyhq/twenty/issues/8300

Context

API events were created too late and were already formatted as Gql responses (including nesting with edges/node/type + formatting that should not exist in an event payload). This PR moves the emit logic to the resolver where we actually do the DB query Note: Also added RESTORED events