Auto with pollingInterval
variable
The useQuery
hook returns startPolling
and stopPolling
functions that can be used to control when to start polling.
Challenge
useQuery
will immediately send a first query, before you start polling- When specifying
skip
in the options,startPolling
stops working in current version 😂 useLazyQuery
does not work well with polling either for current version
Manual
It’s not too hard to implement manual polling leveraging useLazyQuery
feature.
1 | const [getXXX] = |