Fix send email connected account (#12149)

Fixes https://github.com/twentyhq/twenty/issues/12144

Account owner id is not fetched anymore by default in find many
connected accounts.
This is coming from the relation migration, since account owner id is
not a basic field anymore.

Enforcing the fetch of account owner id + adding tests

<img width="251" alt="Capture d’écran 2025-05-20 à 18 23 44"
src="https://github.com/user-attachments/assets/3e3105a0-d3e8-4b5d-87b0-80d3e97ab034"
/>
This commit is contained in:
Thomas Trompette
2025-05-21 11:02:04 +02:00
committed by GitHub
parent ca78fc3f27
commit fe25557337
3 changed files with 178 additions and 0 deletions

View File

@ -0,0 +1,28 @@
export const mockedConnectedAccounts = [
{
id: '8619ace5-1814-4e56-8439-553eab32a5cc',
handle: 'tim@twenty.com',
provider: 'gmail',
scopes: ['https://www.googleapis.com/auth/gmail.readonly'],
accountOwnerId: '56561b12-cbad-49db-a6bc-00e6b153ec80',
},
];
export const getMockedConnectedAccount = () => {
return {
edges: [
{
node: {
...mockedConnectedAccounts[0],
},
cursor: null,
},
],
pageInfo: {
hasNextPage: false,
hasPreviousPage: false,
startCursor: null,
endCursor: null,
},
};
};