[Flexible-schema] Refactor gql query runner to emit api event before processing to gql types (#8596)
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
This commit is contained in:
@ -13,7 +13,7 @@ import { getCompositeFieldMetadataCollection } from 'src/engine/twenty-orm/utils
|
||||
import { isRelationFieldMetadataType } from 'src/engine/utils/is-relation-field-metadata-type.util';
|
||||
|
||||
export function formatResult<T>(
|
||||
data: T,
|
||||
data: any,
|
||||
ObjectMetadataItemWithFieldMaps: ObjectMetadataItemWithFieldMaps,
|
||||
objectMetadataMaps: ObjectMetadataMaps,
|
||||
): T {
|
||||
|
||||
Reference in New Issue
Block a user