Skip to content
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

When using useReadQuery directly before useQueryRefHandlers, refetch won't update the useReadQuery result #11772

Open
phryneas opened this issue Apr 9, 2024 · 1 comment

Comments

@phryneas
Copy link
Member

phryneas commented Apr 9, 2024

Issue Description

I encountered this over in apollographql/apollo-client-nextjs#258:

  const { refetch } = useQueryRefHandlers(queryRef);
  const { data } = useReadQuery(queryRef);

works, but

  const { data } = useReadQuery(queryRef);
  const { refetch } = useQueryRefHandlers(queryRef);

fails to rerender the page when the refetch finishes.

Link to Reproduction

apollographql/apollo-client-nextjs@3a014a4

Reproduction Steps

No response

@apollo/client version

3.9.10

@jerelmiller
Copy link
Member

Was able to confirm in useQueryRefHandlers tests as well.

phryneas added a commit to apollographql/apollo-client-nextjs that referenced this issue Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants