From 6958d57a898fbd5e286f0952c69b09eb75c52a09 Mon Sep 17 00:00:00 2001 From: Andrew Chou Date: Mon, 13 Jan 2025 13:48:55 -0500 Subject: [PATCH] fix: updating own device info should invalidate reads related to project members (#30) --- src/lib/react-query/client.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/react-query/client.ts b/src/lib/react-query/client.ts index 5c932b0..c5830f4 100644 --- a/src/lib/react-query/client.ts +++ b/src/lib/react-query/client.ts @@ -6,6 +6,7 @@ import { type QueryClient, } from '@tanstack/react-query' +import { getProjectsQueryKey } from './projects.js' import { baseMutationOptions, baseQueryOptions, @@ -68,6 +69,9 @@ export function setOwnDeviceInfoMutationOptions({ queryClient.invalidateQueries({ queryKey: getDeviceInfoQueryKey(), }) + queryClient.invalidateQueries({ + queryKey: getProjectsQueryKey(), + }) }, } satisfies MutationOptions< void,