Skip to content

Commit a205b25

Browse files
committed
invalidateOptions to endpointQueryKey
1 parent ae28b8a commit a205b25

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/api/hooks.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export type PaginatedQuery<TData> = {
136136
* Options to pass to `queryClient.invalidateQueries` that will invalidate all
137137
* cached queries to this endpoint, regardless of parameters.
138138
*/
139-
invalidateOptions: { queryKey: readonly [string] }
139+
endpointQueryKey: { queryKey: readonly [string] }
140140
}
141141

142142
/**
@@ -179,7 +179,7 @@ export const getListQueryOptionsFn =
179179
})
180180
},
181181
pageSize: limit,
182-
invalidateOptions: { queryKey: [method] },
182+
endpointQueryKey: { queryKey: [method] },
183183
}
184184
}
185185

app/pages/ProjectsPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export function Component() {
5858

5959
const { mutateAsync: deleteProject } = useApiMutation('projectDelete', {
6060
onSuccess() {
61-
queryClient.invalidateQueries(projectList.invalidateOptions)
61+
queryClient.invalidateQueries(projectList.endpointQueryKey)
6262
},
6363
})
6464

0 commit comments

Comments
 (0)