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:
+2
-8
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user