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)
这是可能的,是的: client.refetchQueries支持显式updateCache
参数。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.