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

Feat/suspense experiment #103

Closed
wants to merge 11 commits into from
Closed

Feat/suspense experiment #103

wants to merge 11 commits into from

Conversation

iamstarkov
Copy link
Owner

inspired by urql-graphql/urql#293

@vercel
Copy link

vercel bot commented Jul 24, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

Latest deployment for this branch: https://topics-manager-git-feat-suspense-experiment.iamstarkov.now.sh

dedupExchange,
suspenseExchange,
cacheExchange,
ssrCache,
Copy link

@kitten kitten Aug 5, 2019

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.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it fixed an issue

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are no errors, and update works. but I still can't make Suspense's fallback to be triggered even with 5s delay network throttling
Screen Shot 2019-08-06 at 2 39 43 AM

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

Successfully merging this pull request may close these issues.

2 participants