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

SSR support: missing cache state transfer/restore? #29

Open
pimlie opened this issue May 4, 2020 · 4 comments
Open

SSR support: missing cache state transfer/restore? #29

pimlie opened this issue May 4, 2020 · 4 comments
Labels
✨ enhancement New feature or request

Comments

@pimlie
Copy link

pimlie commented May 4, 2020

Hey, thanks for this awesome graphql client!

Was wondering whether it is supported to send the cache state after SSR to the client and restore the cache on hydration? The issue at the moment is that this happens:

  • Request SSR page A, fetch data from API
  • Navigate (client side) to page B
  • Hit back button to return to page A, data is again fetched because cache is still empty as previously the query was run on the server side.
@pimlie pimlie changed the title SSR support missing cache state transfer/restore? SSR support: missing cache state transfer/restore? May 4, 2020
@logaretm logaretm added the ✨ enhancement New feature or request label May 5, 2020
@logaretm
Copy link
Owner

logaretm commented May 5, 2020

Thank you for the suggestion, I think this is a good enhancement to have but I'm not sure how to approach it at the moment.

Feel free to PR it if you have any ideas

@pimlie
Copy link
Author

pimlie commented May 5, 2020

I would also need to investigate the best approach but probably would look at the approach that our friends over at vue-apollo have taken:

Currently dont have much time to work on a PR unfortunately, will let you know when that changes.

@lewebsimple
Copy link

Any update on this ?

@logaretm
Copy link
Owner

@lewebsimple No plans for this at the moment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants