Moody (Emad Abdulrahim)

Results 7 comments of Moody (Emad Abdulrahim)

@jerelmiller Hi, where can I read about the changes made to onCompleted in 3.8? Docs have barely any mention of onCompleted. For example, does onCompleted fire when the query get...

@jerelmiller Do the changes to `onCompleted` also apply to useLazyQuery? or only useQuery? > onCompleted doesn't fire on network requests unless notifyOnNetworkStatusChange is set to true I can't seem to...

No you're right. `onCompleted` only fires on subsequent requests if `notifyOnNetworkStatusChange` is set to `true`. Thanks for the speedy response!

One last thing, is there anything to watch out for regarding the timing of when `onCompleted` is fired in React 17 vs 18? Would there be any regression or changes...

I agree many (if not all) of the examples of onCompleted I see should be refactored/eliminated. But putting that aside, the uses can be: - Set some state based on...

sorry to hammer on this, but to be absolutely certain, when you say "since cache updates don't fire `onCompleted`" this is unless `notifyOnNetworkStatusChange` is set to `true`, right?

I see. Luckily we don't have a lot of direct cache manipulation after mutations. We mainly rely on `refetch` property on useMutation hook to revalidate queries. Thanks for clarifying that!