Skip to content

Refetch gets partial data from cache with errorPolicy none #10317

Closed
@EvertEt

Description

@EvertEt

Intended outcome:

Refetch (from useQuery) should have the same behaviour as the first fetch in regards to errorPolicy

Actual outcome:

Refetch does return partial cached data.

  1. query field A and B
  2. A returns, B errors so query errors with partial data for A
  3. refetch
  4. Get data for A, not for B

How to reproduce the issue:

https://codesandbox.io/s/queries-example-app-final-forked-q2yzkk?file=/src/index.js:0-2069

Versions

System:
OS: macOS 12.6
Binaries:
Node: 16.15.1 - ~/Library/Caches/fnm_multishells/64442_1668614128695/bin/node
Yarn: 3.2.3 - /opt/homebrew/bin/yarn
npm: 8.11.0 - ~/Library/Caches/fnm_multishells/64442_1668614128695/bin/npm
Browsers:
Chrome: 107.0.5304.110
Firefox: 103.0.2
Safari: 16.1
npmPackages:
@apollo/client: ^3.5.9 => 3.5.9
apollo3-cache-persist: ^0.8.0 => 0.8.0
react-native-apollo-devtools-client: ^1.0.4 => 1.0.4

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions