import type { QueryClient, QueryKey } from '@tanstack/react-query'

export async function invalidateQueryKeys(queryClient: QueryClient, keys: QueryKey[]): Promise<void> {
  await Promise.all(keys.map((queryKey) => queryClient.invalidateQueries({ queryKey })))
}
