InvalidateQueries of multiple keys
If I have a query such as this:
const todoListQuery = useQuery({
queryKey: ['todosFull', 'todoSpecific'],
queryFn: fetchTodoList,
})
and then I invalidate the query with queryClient.invalidateQueries({ queryKey: ['todoSpecific'] })
Should that work? or do I need to do queryClient.invalidateQueries({ queryKey: ['todosFull', 'todoSpecific'] }) for it
const todoListQuery = useQuery({
queryKey: ['todosFull', 'todoSpecific'],
queryFn: fetchTodoList,
})
and then I invalidate the query with queryClient.invalidateQueries({ queryKey: ['todoSpecific'] })
Should that work? or do I need to do queryClient.invalidateQueries({ queryKey: ['todosFull', 'todoSpecific'] }) for it