Refetch triggers twice
See original GitHub issueIntended outcome:
refetch
should always work correctly
Actual outcome:
refetch
sometimes triggers twice, one with the new variables (which is correct) and after that with the initial variables
How to reproduce the issue:
i can not reproduce constantly, sometimes works ok, sometimes does not, i tried many things from using the old HOCs graphql
to new react render-prop components, changing fetchPolicy and more
Versions latest
Issue Analytics
- State:
- Created 5 years ago
- Reactions:10
- Comments:6 (1 by maintainers)
Top Results From Across the Web
In Next.js, why does useQuery fetch data twice (once on the ...
So, it seems clear that it is fetching twice even though ssr is configured. If I set {ssr: false} in useQuery, it does...
Read more >Apollo client fetchPolicy issues - query called twice
If I'm using one of cache-and-network or network-only fetch policies, one of the queries is called twice. This doesn't happen when I use ......
Read more >Why is my fetch getting called twice? : r/reactjs - Reddit
It shows it getting called twice in the console, but only shows once rendered on the page. import React, { useEffect, useState }...
Read more >useMutation | Vue Apollo
This ensures that query refetching does not hold up mutation response ... update : This function will be called twice over the lifecycle...
Read more >React 18 useEffect Double Call for APIs: Emergency Fix
Here is why this works. The first time the useEffect is called the myFetch starts the fetch and stores the promise in the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The issue was too serious for our company’s product, imagine our users sometimes couldnt use filter, search and load more… so we dropped apollo client and created our own version. Good luck!
This is still an issue, but the “OP” was just closed #2285