apollographql / apollo-client

:rocket:  A fully-featured, production ready caching GraphQL client for every UI framework and GraphQL server.
https://apollographql.com/client
MIT License
19.38k stars 2.66k forks source link

Factor out query normalization and denormalization functionality #255

Closed stubailo closed 8 years ago

stubailo commented 8 years ago

This will let people build their own smart GraphQL clients, or use this stuff without Redux.

stubailo commented 8 years ago

See conversation with @kennetpostigo here: https://apollostack.slack.com/archives/apollo-client-core/p1464297850000536

Also, this would probably be helpful for #244

Ideally these would be importable from this package without using the rest of the code, or in a separate package entirely.

helfer commented 8 years ago

I'm thinking a separate package would be better, so versions don't have to be updated in lock-step.

smolinari commented 8 years ago

Thanks guys! I am almost certain this remodelling is a good step for Apollo to work best with other state managers, for instance, Vuex, which is Vue.js' own state manager. As I see it, and correct me if I am wrong, but the redux part of Apollo and Vuex do basically the same thing (only different). So, to get Vuex working with Apollo, we'd need different entry points as Evan pointed out (I believe) with queryWatch in another discussion.

Or am I totally off with my understanding here? :smile:

Scott

stubailo commented 8 years ago

No I think your understanding is good! We have a top-level issue for this: https://github.com/apollostack/apollo-client/issues/256

stubailo commented 8 years ago

So far the best we have here is: https://github.com/apollostack/graphql-anywhere

We still need to work on getting Apollo to work with VueX, but I don't think that will be related, since it will probably be more of a plug-in into Apollo.