-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feat/suspense experiment #103
Conversation
This pull request is automatically deployed with Now. Latest deployment for this branch: https://topics-manager-git-feat-suspense-experiment.iamstarkov.now.sh |
dedupExchange, | ||
suspenseExchange, | ||
cacheExchange, | ||
ssrCache, |
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.
@iamstarkov Found the bug 😁 The ssrExchange
behaves differently on the client and server. Previously we haven't taken the suspenseExchange
into account, so we simply assume !!client.suspense
means we're on the server and !client.suspense
means we're on the client.
So, what happens is, since you're using SSR + @urql/exchange-suspense
the client-side is always assuming that it's actually on the server-side. So it never deletes its cached SSR data.
We'll have to fix this by maybe adding isServer: boolean
to the ssrExchange({ ... })
options.
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.
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.
it fixed an issue
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.
thank you
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.
9f20f06
to
15b0caf
Compare
15b0caf
to
eda5dd1
Compare
inspired by urql-graphql/urql#293