From a205b25aa00569b24c766fa867b419db62daa2b0 Mon Sep 17 00:00:00 2001 From: David Crespo Date: Fri, 6 Dec 2024 12:35:49 -0600 Subject: [PATCH] invalidateOptions to endpointQueryKey --- app/api/hooks.ts | 4 ++-- app/pages/ProjectsPage.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/api/hooks.ts b/app/api/hooks.ts index 412011b34..d93d70922 100644 --- a/app/api/hooks.ts +++ b/app/api/hooks.ts @@ -136,7 +136,7 @@ export type PaginatedQuery = { * Options to pass to `queryClient.invalidateQueries` that will invalidate all * cached queries to this endpoint, regardless of parameters. */ - invalidateOptions: { queryKey: readonly [string] } + endpointQueryKey: { queryKey: readonly [string] } } /** @@ -179,7 +179,7 @@ export const getListQueryOptionsFn = }) }, pageSize: limit, - invalidateOptions: { queryKey: [method] }, + endpointQueryKey: { queryKey: [method] }, } } diff --git a/app/pages/ProjectsPage.tsx b/app/pages/ProjectsPage.tsx index 10caab42e..c0106b962 100644 --- a/app/pages/ProjectsPage.tsx +++ b/app/pages/ProjectsPage.tsx @@ -58,7 +58,7 @@ export function Component() { const { mutateAsync: deleteProject } = useApiMutation('projectDelete', { onSuccess() { - queryClient.invalidateQueries(projectList.invalidateOptions) + queryClient.invalidateQueries(projectList.endpointQueryKey) }, })