Skip to content

[4.0] useLazyQuery: Changing variables that return error leaves previous data when notifyOnNetworkStatusChange is false #12551

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

Open
jerelmiller opened this issue Apr 11, 2025 · 0 comments
Labels
Milestone

Comments

@jerelmiller
Copy link
Member

Issue Description

See #12512 (comment)

When changing variables with notifyOnNetworkStatusChange: true, data is set to undefined when loading. When changing notifyOnNetworkStatusChange to false however, if an error is returned as a result, data is left to the previous variables value, rather than getting set to undefined. data should be aligned in both cases so that data doesn't depend on whether the loading state is emitted or not.

Link to Reproduction

#12512 (comment)

Reproduction Steps

No response

@apollo/client version

4.0.0-alpha.8

@jerelmiller jerelmiller added this to the Release 4.0 milestone Apr 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant