( client: QueryClient, id: string, )
| 39 | } |
| 40 | |
| 41 | export const invalidatePostCacheById = ( |
| 42 | client: QueryClient, |
| 43 | id: string, |
| 44 | ): void => { |
| 45 | const postQueryKey = getPostByIdKey(id); |
| 46 | const postCache = client.getQueryData(postQueryKey); |
| 47 | if (postCache) { |
| 48 | client.invalidateQueries({ queryKey: postQueryKey }); |
| 49 | } |
| 50 | }; |
| 51 | |
| 52 | export const removePostComments = ( |
| 53 | client: QueryClient, |
no test coverage detected