Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Hooks v3.1.5 breaks refetch functionality #3990

Open
pitops opened this issue May 26, 2020 · 1 comment
Open

Hooks v3.1.5 breaks refetch functionality #3990

pitops opened this issue May 26, 2020 · 1 comment

Comments

@pitops
Copy link

pitops commented May 26, 2020

Intended outcome:

Refetch query and update state

Actual outcome:

Network request completes but the hook does not initiate a re-render. Only with a hard reload i could see the new state.

How to reproduce the issue:

const [signout] = useMutation(SIGN_OUT_MUTATION)

await signout({
  refetchQueries: [
  {
    query: CURRENT_CUSTOMER_QUERY
   }
  ],
  awaitRefetchQueries: true
})

Its simple the above doesn't update the state. Reverted to v3.1.4 and it works.
Version

System:
    OS: macOS 10.15.4
  Binaries:
    Node: 12.13.1 - /usr/local/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.4 - /usr/local/bin/npm
  Browsers:
    Chrome: 83.0.4103.61
    Firefox: 70.0.1
    Safari: 13.1
  npmPackages:
    @apollo/react-hooks: 3.1.4 => 3.1.4 
@arcadiansc
Copy link

Same issue here. I just had to revert back as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants