1

I would like to know if the refetch function that the useQuery hook returns invalidates the cache, since I need to retrieve the newest data from the resolver after a mutation is triggered. Is refetch enough or should I invalidate the cache manually?

const { refetch } = useQuery(MY_QUERY)

agustin37
  • 121
  • 6

1 Answers1

1

This is possible, yes: client.refetchQueries supports an explicit updateCache param.

bryce
  • 3,022
  • 1
  • 15
  • 19