Fix message channel processing (#12021)

Several users have complained about not being able to read their emails
anymore.

This is because the find-messages post query hook is expecting
ObjectRecord[] as an input but is actually getting a graphql Connection

Typing was wrong. This PR fixes the typing and make sure the post query
hook always get an ObjectRecord[]
This commit is contained in:
Charles Bochet
2025-05-13 21:16:23 +02:00
committed by GitHub
parent c0a0214879
commit 0202586d36
48 changed files with 217 additions and 129 deletions
@@ -171,20 +171,14 @@ export abstract class GraphqlQueryBaseResolverService<
options.objectMetadataMaps,
);
const resultWithGettersArray = Array.isArray(resultWithGetters)
? resultWithGetters
: [resultWithGetters];
await this.workspaceQueryHookService.executePostQueryHooks(
authContext,
objectMetadataItemWithFieldMaps.nameSingular,
operationName,
resultWithGettersArray,
resultWithGetters,
);
return Array.isArray(resultWithGetters)
? resultWithGettersArray
: resultWithGettersArray[0];
return resultWithGetters;
} catch (error) {
workspaceQueryRunnerGraphqlApiExceptionHandler(error, options);
}