Fix update event webhook triggering (#7814)
This commit is contained in:
@ -361,19 +361,21 @@ export class GraphqlQueryRunnerService {
|
|||||||
authContext.workspace.id,
|
authContext.workspace.id,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const resultWithGettersArray = Array.isArray(resultWithGetters)
|
||||||
|
? resultWithGetters
|
||||||
|
: [resultWithGetters];
|
||||||
|
|
||||||
await this.workspaceQueryHookService.executePostQueryHooks(
|
await this.workspaceQueryHookService.executePostQueryHooks(
|
||||||
authContext,
|
authContext,
|
||||||
objectMetadataItem.nameSingular,
|
objectMetadataItem.nameSingular,
|
||||||
operationName,
|
operationName,
|
||||||
Array.isArray(resultWithGetters)
|
resultWithGettersArray,
|
||||||
? resultWithGetters
|
|
||||||
: [resultWithGetters],
|
|
||||||
);
|
);
|
||||||
|
|
||||||
const jobOperation = this.operationNameToJobOperation(operationName);
|
const jobOperation = this.operationNameToJobOperation(operationName);
|
||||||
|
|
||||||
if (jobOperation) {
|
if (jobOperation) {
|
||||||
await this.triggerWebhooks(resultWithGetters, jobOperation, options);
|
await this.triggerWebhooks(resultWithGettersArray, jobOperation, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
return resultWithGetters;
|
return resultWithGetters;
|
||||||
|
|||||||
Reference in New Issue
Block a user