-
Notifications
You must be signed in to change notification settings - Fork 161
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
Upgrade React Apollo (new apollo client structure) #270
Comments
Something to note, they’ve remove Redux as the default cache for Apollo. Redux (as well as other stores) can still be used with configuration. |
Any update on this? |
I'm planning to work on this on couple of weeks but PR's welcome :) @lolcoolkat |
@Sly777 looking forward to this PR, and thank you for your work. |
hi, any update on this? :) |
I am extremely grateful for @sly77's contribution to the community. As a new user, this template looks like an amazing place to start containing much that I need to learn about. Please don't lose momentum on this amazing project. |
I totally know how that goes! I hope that someone watching that has some apollo experience would be willing to give back to the community and do this upgrade. I looked at the upgrade docs and they don't look too bad: https://www.apollographql.com/docs/apollo-server/v2/migration-two-dot.html |
I was working on this last weekend but I realized the biggest issue is the new local cache feature of Apollo. It doesn't fit redux well and I need to change the structure without redux which nobody wants I think :) I also tried to find redux plugins for this but there is no good option to integrate into RAN. So I stuck a little bit because of redux. I also thought maybe we can use something like this;
But in this structure, there are some missing parts between Apollo and Redux. So it's open for any suggestions. |
Experienced users will struggle emotionally with eliminating redux from their stack but based on my research it might be the right thing to do: The new apollo is trying to intentionally and conveniently eliminate the cognitive and maintenance overhead of maintaining a separate local store (link). Relay is also going that direction. I believe users discovering RAN are mostly newer and wanting to learn production best practices and optimizations. There is no doubt they need to learn a graphql client. The question experienced users need to try and answer as unemotionally as possible...can the current version of apollo client (and perhaps some context) eliminate the price to learn and maintain redux or do new users still need it? ReasonReact, what Facebook is migrating their internal production into, comes with the concept of reducer built into the language. The combination of this plus graphql client local store continually improving I believe is going to completely deprecate redux. Knowing redux is likely not part of our future might help people accept moving away from it now. This thread here is valuable reading for anyone willing to help evaluate the pros/cons of potential best ways forward based on where we are at (linking directly to some real examples that might help but read the whole thread).
|
Thanks to @gufranmirza, RAN started to use new react apollo from now on!! |
On Apollo v2, Most of the parts are changed and also They removed redux integration inside of it.
The text was updated successfully, but these errors were encountered: