question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Decouple GraphQL store with a generic API

See original GitHub issue

I think it might be kinda cool to provide some sort of interface similarly to how we do it with NetworkInterface.

Redux could be the “default” but excludable, and users could plug in mobx or reflux or whatever.

If the interface implements async functions, the store could even be run in something like redis (for server side caching, for instance, for inter-service RPC) or a web worker to reduce the number of state change cycles on the main thread.

I think it might be worth exploring. Doesn’t seem like it would add much cost other than initial dev time to establish an interface. After that it would likely result in better code even within the internal lib, since there would be a well-enforced contract with how apollo-client couples itself to the implemented caching mechanism.

Wondering what other people think about this idea @stubailo @helfer

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:22
  • Comments:31 (11 by maintainers)

github_iconTop GitHub Comments

17reactions
emcpaddencommented, May 29, 2017

Looking forward to an integration with ngRX. I am using ngRX already and really love it, it feels like the right redux-style store for Angular apps. I am just starting to look at graphQL/apollo and would love to have a clean integration between the two. It would be a great bridge for adoption for Angular users that want to stay close to Angular projects like ngRX.

15reactions
helfercommented, Apr 30, 2017

Yes, this is still on our radar. We’re also trying to make sure it’s aligned with iOS and Android, so it’s probably going to take another week or two until we put a more complete draft out there. Our latest blog post contains a very high-level overview though.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HOC - Apollo GraphQL Docs
The graphql() function is the core of Apollo's HOC API. Use this function to create higher-order components that can execute queries and update...
Read more >
Combining All the Things: GraphQl Middleware to ... - YouTube
Daniel Rogers, Nick RigbyA decoupled, API -first architecture can be fast and efficient. But it can also generate lots of different things in ......
Read more >
Building an Analytics API with GraphQL: The Next Level of ...
A big one is your API schema decouples from your database schemas. For example, you use AWS Lambda functions today to query Google...
Read more >
Where we Come From: An Honest Introduction to GraphQL
It's an API that started optimized like we wanted and became very generic, due to the failure to adapt to a lot of...
Read more >
Decoupling Frontend and Backend Development - Dialectica
Apollo Client is a comprehensive state management library for JavaScript. It allows you to build UI components conveniently. Using GraphQL, you ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found