Comments (8)
Currently reactivity is not on the short-term roadmap. We're trying to make the data loading experience for static data really good before jumping into reactivity. It turns out that reactivity and data streaming is a really easy crutch to lean on to fix data consistency problems, so we want to build something that works really well without it. It turns out most data sources people want to access at first aren't reactive anyway.
Currently, there are a few ways to get reactive features:
pollInterval
onwatchQuery
on Apollo Client will let you poll the server periodically: http://docs.apollostack.com/apollo-client/core.html#watchQuery- You can manually call
refetch
on the query when you need new data - After we add a couple new features to apollo client, you'll be able to manually stream websocket events into the store: apollographql/apollo-client#180
- You can use Meteor subscriptions for the reactive parts of your app, and use Apollo for the static parts
from apollo.
Yeah if the realtime features of Meteor pub sub work well for you there's almost nothing out there that will give you the same feature set right now. We're slowly trying to move towards that for GraphQL but it's not going to be there for a while.
from apollo.
Great stuff! I just read https://medium.com/apollo-stack/graphql-subscriptions-in-apollo-client-9a2457f015fb#.k80opif19
Just so I know I'm on the right track, couple questions:
- Does that article implement #3 on the list above?
- Seems like you've almost got full reactivity working without the invalidation server. I'm confused, what was the invalidation server for, in that case? If it's still necessary, what is it necessary for?
from apollo.
@joncursi I believe Sashko you're looking for is @stubailo ;)
from apollo.
Also - I thought that GraphQL didn't play well with polling for changes? How is this checking for GraphQL changes?
from apollo.
GraphQL subscriptions are pretty different - they don't do any change detection of diffing of data. When an event arrives, you just get the whole new result.
The invalidations and live queries would be something for the future, and the focus would be to get fine-grained updates, which subscriptions don't give you at all.
GraphQL subscriptions are definitely a great replacement for (3).
I thought that GraphQL didn't play well with polling for changes?
What do you mean?
from apollo.
@sashko is any of this reactivity possible in a Meteor + Apollo server today, or is the "recommended" solution for Meteor users mentioned here to use Meteor pubsub for live data and Apollo for static?
I just tried out Apollo subscriptions and wasn't thrilled with all of the setup and extra code that needed to be written in comparison to Meteor's pub/sub magic. Meteor spoiled me! 💃 (Plus the overhead of having to manage another external service like Redis... oy!)
from apollo.
Got it, thank you!
from apollo.
Related Issues (20)
- Incompatible Gatsby plugin
- ESLint warnings
- Upgrade Space-X Rest API Version - Tutorial
- Installing @apollo/client for React gives Eslint errors. HOT 1
- Issue with example Launches url - api has HTTP ERROR 502
- useQuery fetch data is different in network and console.log HOT 1
- SchemaError doesn't show which fields have errors
- SchemaError doesn't show which fields have errors
- @apollo/client (react) make nested custom object type for mutation
- GitHub Integration docs using rover - duplicate and dated content HOT 1
- Ability to configure schema registration without env vars HOT 1
- [Question][Feature Request] - How To update varaibles inside of Studio from mutation response HOT 1
- Apollo Client adds __typename at the end of the type while apollo CLI adds at the top of the type
- Apollo studio connected to http://localhost doesn't work with cookies HOT 1
- buildSubgraphSchema errors with duplicated query type HOT 1
- Apollo Studio - GraphQL scaled out into Multiple Clusters
- [Question] Gateway and DOWNSTREAM_SERVICE_ERROR HOT 1
- React native cli with apollo pagination
- Apollo Studio on fragments variables request error
- Issue with user input errors coming through datadog metrics.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apollo.