-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Create option to force queries to use local store #225
Comments
@stubailo If we have already fetched data via a query, should this |
I think this can be a pretty small feature: (1) A new option to This will enable people using Apollo @abhiaiyer91 it seems what you're talking about is a bit different, and I'd say it warrants a separate issue, which is the ability to load Apollo data from the Redux store directly without going through ApolloClient? I guess I'm not really sure why people would need to do that, since eventually the Apollo |
Just found a reason - other redux wrappers like Redux Form. |
Yea, I'm glad you did ;). I've been looking for a better answer than 'because it feels right to me.' To me, it seems natural that we should be able to blend apollo seamlessly into Redux. One of the major design points of Redux is the single state container. With Apollo/Redux we now have a nested state container within a container, that can no longer be easily directly accessed. The Apollo object is now available sort of globally via redux, and we can use it to inject data into our components, but we are forced to trade the control, precision and power of redux for the intelligence and brevity of code of Apollo. Right now, I am using Apollo client in two ways: 1) I am using Apollo client and writing all of the redux types, actions, reducer etc. In other, words, I'm not using the Redux integration. 2) For some components, I'm trying to use the Apollo/Redux integration. Being able to access Apollo data in the store would largely remove this distinction. |
Filed a new issue here: #227 |
There are instances where it's advantageous to prevent a query from trying to fetch data from the server. For example, if two components depend on the same data, and are both connected to the same query, both queries will fetch data from the server if neither query has completed before the other is executed. In instances like these, finer grained control would be useful.
In reference to: https://forums.meteor.com/t/apollo-query-patterns-with-react-redux/23347/5
The text was updated successfully, but these errors were encountered: