From 7143944fbae8bc552e9bdffce37f9b25b01520ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Sibiril?= <81782+aureliensibiril@users.noreply.github.com> Date: Thu, 16 Apr 2026 14:14:10 +0200 Subject: [PATCH] Use @deleteRecord on SCIM disconnect mutation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The custom updater on the SCIM disconnect mutation ran on every response and nulled organization.scimConfiguration in the Relay store -- including on error responses, which flipped the UI to the "disconnected" state even when the backend had actually rejected the delete. Replace the updater with a @deleteRecord directive on the returned deletedScimConfigurationId, matching the pattern already used in SCIMConfiguration.tsx. @deleteRecord is a no-op when the returned id is null, so error responses no longer produce a false-positive UI update. Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com> --- .../settings/_components/GoogleWorkspaceConnector.tsx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/apps/console/src/pages/iam/organizations/settings/_components/GoogleWorkspaceConnector.tsx b/apps/console/src/pages/iam/organizations/settings/_components/GoogleWorkspaceConnector.tsx index cc809ec90..72376542b 100644 --- a/apps/console/src/pages/iam/organizations/settings/_components/GoogleWorkspaceConnector.tsx +++ b/apps/console/src/pages/iam/organizations/settings/_components/GoogleWorkspaceConnector.tsx @@ -54,7 +54,7 @@ const deleteSCIMConfigurationMutation = graphql` $input: DeleteSCIMConfigurationInput! ) { deleteSCIMConfiguration(input: $input) { - deletedScimConfigurationId + deletedScimConfigurationId @deleteRecord } } `; @@ -147,12 +147,6 @@ export function GoogleWorkspaceConnector(props: { variant: "error", }); }, - updater: (store) => { - const organizationRecord = store.get(organizationId); - if (organizationRecord) { - organizationRecord.setValue(null, "scimConfiguration"); - } - }, }); };