Fix update event webhook triggering (#7814)

This commit is contained in:
martmull 2024-10-18 10:20:21 +02:00 committed by GitHub
parent f6c094a56f
commit 0c24001e23
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -361,19 +361,21 @@ export class GraphqlQueryRunnerService {
authContext.workspace.id,
);
const resultWithGettersArray = Array.isArray(resultWithGetters)
? resultWithGetters
: [resultWithGetters];
await this.workspaceQueryHookService.executePostQueryHooks(
authContext,
objectMetadataItem.nameSingular,
operationName,
Array.isArray(resultWithGetters)
? resultWithGetters
: [resultWithGetters],
resultWithGettersArray,
);
const jobOperation = this.operationNameToJobOperation(operationName);
if (jobOperation) {
await this.triggerWebhooks(resultWithGetters, jobOperation, options);
await this.triggerWebhooks(resultWithGettersArray, jobOperation, options);
}
return resultWithGetters;