react-apollo
react-apollo copied to clipboard
useLazyQuery with refetch doesn't trigger onCompleted - URGENT
i'm using
"@apollo/client": "^3.0.0-beta.50",
useLazyQuery with refetch doesn't trigger onCompleted
when i modify the fetchPolicy in here:
export const client = new ApolloClient({
version: '1',
resolvers: {},
cache: cache,
link: ApolloLink.from([
errorLink,
authLink,
ApolloLink.split(hasSubscriptionOperation, wsLink, httpLink),
]),
queryDeduplication: false,
defaultOptions: {
watchQuery: {
fetchPolicy: 'network-only',
},
},
});
onComplete is causing repeatly in an infinite loop the call
Huge BUG
not only Lazy queries... normal queries does that too... Please tag me if find any solution 🙏🏼
no solution so far...any react-apollo people can answer to this ISSUE?
no solution but "apollo-client": "^2.6.10" doesn't show this problems.
As for refetch is a promise,you can try refetch().then().