Fix update on delete record (#3996)

This commit is contained in:
Weiko
2024-02-16 13:08:24 +01:00
committed by GitHub
parent 44ac16c82e
commit 8e3723b88e

View File

@ -364,6 +364,10 @@ export class WorkspaceQueryRunnerService {
const result = graphqlResult?.[0]?.resolve?.data?.[entityKey];
const errors = graphqlResult?.[0]?.resolve?.errors;
if (['update', 'deleteFrom'].includes(command) && !result.affectedCount) {
throw new BadRequestException('No rows were affected.');
}
if (errors && errors.length > 0) {
const error = computePgGraphQLError(
command,