-
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
Making Redux optional by offering custom data-storage locations #256
Comments
So what about managing query state, mutations and results ? Have you read the code for the QueryManager? Why add more code to modify how those pieces of data work just to put your data in a diff object? |
@antitoxic I was thinking we could just do #255, that would get us to 95% of the goal. Rewriting the whole library to allow plugging in something instead of Redux is probably not going to happen, but I was thinking refactoring to allow someone to build that very easily is a good goal! |
@stubailo agreed. @abhiaiyer91 do you require all people that submit issues to have read the On Mon, 30 May 2016, 02:56 Sashko Stubailo, [email protected]
|
Lol. @antitoxic I think you read my comment the wrong way. I was merely poking you for more reasoning. I don't know if what you are suggesting is right or wrong, only to explore if you have thought deeply about what you are proposing. |
To be fair, QueryManager only plugs into redux in 2 ways: |
Poking is much less preferred than asking "have you though about it in depth and in what scenario". Anyway:
What about them? Redux is just an immutable object exposing 2 main API points - dispatch and getstate.
No.
Because redux is not the only thing existing for keeping state (mobx, SAM, etc..). I'm trying not to use redux and cut down on boilerplate in my apps. I need graphql and apollo seem like a good client (i'm evaluating this). However in order to hook Apollo store to my own logic of state-keeping I'm doing kind of hacky wiring - I'm launching a redux store, writing a reducer that listens for Which is making me wonder is it possible for me to keep only the actual data return from the graphql server in my state? Could I initialize Apollo client with the return of a query which looks like this:
instead initializing Apollo client with its store data object which is something like:
So I'm opening #258
That's a good option. |
You can go and just use graphql without apollo and do it like you want. |
@aleksandrenko :) The issue has been closed. Mainly because @stubailo mentioned there is a limitation but it will be overcome when the normalization is extracted, which actually will solve a lot of other things and also, in the redux' issue about Relay there already community gathering to contribute to that. "infancy" or "just make an abstraction" are not solutions. Any package could be abstracted out. I'm already doing abstractions with apollo client for other things (discussed in slack). I'm trying to keep them below the threshold which will cause me to switch to another package. If I have to continue abstracting or digging into TypeScript I will have no reason not to just butcher Relay and use it because its roadmap shows a lot of useful stuff coming. So I think submitting issues about apollo client and discussing problems is quite enough. |
Add documentation for batch wares
In my point of view apollo client is getting data and putting it in a plain object. Currently this object is redux' store. But I don't see a reason why it can't be just a plain object.
I imagine:
I understand that redux is chosen for its nice devtools but ultimately apollo-client can work without it which will make it more flexible.
The text was updated successfully, but these errors were encountered: