-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
fix: ssr logic shouldn't be used when rendering from the client #5839
Conversation
@@ -51,10 +52,11 @@ describe('useQuery Hook', () => { | |||
|
|||
describe('General use', () => { | |||
it('should handle a simple query properly', async () => { | |||
let resultData; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I modified this test to ensure it never gets stuck in a loading state since it never did an expect if loading = true.
Can confirm this is indeed an issue when using v3.1.2. |
@hwillson, the gentlest bump on this. Issue is also stopping us to use |
Any update on this? I'd be willing to help out if needed :) |
Hi @mikebm 👋 Sorry for the delay here! There have been considerable changes to the library since this PR was opened— |
This PR addresses an issue where the SSR loading state could be returned on the client. The issue was introduced on this PR: https://github.com/apollographql/react-apollo/pull/3515/files
When temporarily using
disableNetworkFetches
on the client, it caused components to get stuck in a loading state coming from the SSR logic. This can be seen on network-only, and cache-and-network fetch policies when using a workaround as described here:#4814