What is the best way to refetch with dependent queries
is there a way to also refetch the dependent query? currently, when i refetch for example the id does not refetch the projects.
3 Replies
ratty-blush•3y ago
structure the keys hierarchically:
then, you can use
queryClient.invalidateQueries({ queryKey: ['user'] }) to target both of themextended-salmonOP•3y ago
@TkDodo 🔮 i dont need to call the refetch()?
ratty-blush•3y ago
no