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

update react tutorial to support apollo client v3 #190

Closed
praveenweb opened this issue Apr 20, 2020 · 3 comments
Closed

update react tutorial to support apollo client v3 #190

praveenweb opened this issue Apr 20, 2020 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@praveenweb
Copy link
Member

The current react tutorial uses Apollo Client v2 stable. v3 changes some of the APIs. We can update the tutorial with the necessary changes.

  • cache.read and cache.write are replaced with cache.modify.

// TODO: Add more changes here.

@praveenweb praveenweb added the help wanted Extra attention is needed label Jun 2, 2020
@kriswep
Copy link
Contributor

kriswep commented Jun 3, 2020

I could do this.
Currently, there are two react tutorials here, react-apollo and react-apollo-hooks.
The version on https://hasura.io/learn/ seems to be the `react-apollo-hooks, correct?

@praveenweb
Copy link
Member Author

@kriswep - Yes! react-apollo-hooks is the latest one and maintained. The react-apollo is the old one that uses Apollo Components and we don't maintain that anymore and is there just for reference code.

Apollo has released v3.0.0-rc.0. Might be good to break down what changes for the current tutorial.

High level, I see that

  • Packages have changed (@apollo/client replaces apollo-boost and a few others).
  • Managing cache needs to be updated.
  • Optimistic UI usage might need an update.
  • Verify if there are changes to subscriptions.

@kriswep
Copy link
Contributor

kriswep commented Jun 3, 2020

Yes, nice.
I‘d follow apollos‘ migration guide and figure things out from there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants