Return graphql errors when exists (#5389)

- throw badRequest with graphql error messages when graphql request
fails
- clean some code

Before
<img width="1470" alt="image"
src="https://github.com/twentyhq/twenty/assets/29927851/0b700d9a-2bbe-41f7-84a9-981dc7dd5344">

After

![image](https://github.com/twentyhq/twenty/assets/29927851/6bbaaf7c-1244-473d-9ae5-4fefc6a1b994)
This commit is contained in:
martmull
2024-05-14 13:21:55 +02:00
committed by GitHub
parent 1bc9b780e5
commit ffdd3a7d4e
9 changed files with 68 additions and 81 deletions

View File

@ -483,6 +483,7 @@ export class WorkspaceQueryRunnerService {
const { workspaceId, userId, objectMetadataItem } = options;
assertMutationNotOnRemoteObject(objectMetadataItem);
assertIsValidUuid(args.id);
const query = await this.workspaceQueryBuilderFactory.deleteOne(
args,