Open
Description
Describe the bug
Setting the debounce
option makes the query fetch twice (2 network calls). Once for the initial fetch, then another after the debounce duration. Only happens with a fetchPolicy
of cache-and-network
or network-only
. The debounce seems to be ignored when it's set to other fetch policies.
To Reproduce
Steps to reproduce the behavior:
- Use useQuery
- Set debounce option
- Observe network in dev tools
Expected behavior
- Should not trigger a 2nd fetch after the debounce duration on initial fetch.
- Should work on other fetch policies besides
cache-and-network
andnetwork-only
. - Should react on variable changes regardless of fetch policies.
Versions
vue: 2.6.11
vue-apollo: 4.0.0-alpha.8
apollo-client: 2.6.8
Additional context
When the fetch policy is set to cache-and-network
or network-only
, it fetches twice as described. However, it works as expected after any variable changes afterwards on the mentioned fetch policies.
On other fetch policies, it seems to be ignored even after variables
changes. Is this intended?