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

useQuery SSR: false doesn't run on client #6912

Closed
stevez86 opened this issue Aug 26, 2020 · 2 comments
Closed

useQuery SSR: false doesn't run on client #6912

stevez86 opened this issue Aug 26, 2020 · 2 comments

Comments

@stevez86
Copy link

This issue is reported on other repos but since the react functionality is now included in this repo and I didn't see it reported I wanted to create the issue to track it.

The issue:
I'm using nextjs (latest ~9.5) and the apollo example (using latest apollo client)
When ssr: false in useQuery the query is not loaded on the client

I would expect the query to be called on the client

Here are past issues about it:
apollographql/react-apollo#3418
apollographql/react-apollo#4003

@maapteh
Copy link

maapteh commented Aug 29, 2020

I think its your setup :)

I validated it with client version 2 and 3 and nextjs and both execute on the client with ssr: false
See https://github.com/maapteh/sandbox-react-apollo-issues-3918 this has two versions you can play with the options

Most people make the error here:
apollographql/react-apollo#3500 (comment) and below!

I know for sure it works correctly because i started the above issue, where it executed ssr: false twice on server and client and after the fix only on the client. Maybe nextjs should add better recipes.

@hwillson
Copy link
Member

hwillson commented May 5, 2021

It doesn't sound like there is an outstanding issue here, so closing. Thanks!

@hwillson hwillson closed this as completed May 5, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 15, 2023
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

3 participants