-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Subscription updateQuery triggers refetch #6340
Comments
I'm pretty sure the same thing is causing E.g. something like this: const MyComponent = () => {
const { fetchMore } = useQuery(MY_QUERY, {
fetchPolicy: 'cache-and-network',
})
useEffect(() => {
fetchMore({variables: {cursor: 1}})
}, [])
return null
} |
Could someone provide a small runnable reproduction that demonstrates this? Thanks! |
This is fixed in |
This is still happening in version 3.3.11. |
@benjamn Well? Are you going to fix that? This bs still happens on 3.3.19 and has broken my app! |
Intended outcome:
When receiving data from a websocket subscription, only the original
useQuery
data
object should get modified.Actual outcome:
When receiving data from a websocket subscription, the original query as defined in
useQuery
is run again as ifrefetch
was called.This happens each time new subscription data is received.
How to reproduce the issue:
The issue occurs with this simple setup:
MY_QUERY
andMY_SUBSCRIPTION
are identical (except for thequery
andsubscription
prefix) and include anid
for all types.Versions
This behavior seems to have been introduced in
3.0.0-beta.46
.The text was updated successfully, but these errors were encountered: