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) }, })