Skip to content

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

Closed
@jerelmiller

Description

@jerelmiller

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

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions