This is a Good Time to Learn ApolloGraphQL

The Apollo 2.0 API and docs, together with the new Query, Mutation and Subscription components, have greatly lowered the learning curve, and increased the ease-of-use, of ApolloGraphQL.

I’ve been porting my Apollo 1 app to Apollo 2, and really like how now functions required for queries and mutations (optimisticResponse, update, etc.) can be all in one place, contained within the query component.

Also, the Apollo 2 imperative cache is really cool. Instead of having a component maintain a local copy of the data it displays, and updating the component props or state to get a new render, Apollo 2 encourages the developer to read that data whenever needed from the cache – and writing it back to the cache after an update, causes React to redraw the relevant UI in that component.

Great job, MDG Apollo!

3 Likes

Do you have any recommendation for a guide how to integrate Apollo 2 with Meteor?

Yes. I used a free tutorial from LevelUp Tuts. The author, @stolinski, is a member of this forum. It does a great job of introducing Meteor + React + Apollo 2, with a working sample app.

https://www.youtube.com/watch?v=m0TC5DcFHDY&list=PLLnpHn493BHFTDL9M1PKnxQwBwOZ8J-h4

1 Like

Thanks for sharing. I will be redoing this series already very soon in a more complete way covering SRR, code splitting, the render prop components, a more streamlined setup and lots of other good stuff.

9 Likes

I have heard that real time is not very easy with Apollo. Has this changed?

As with anything else, there’s a learning curve with Apollo. But with the improvements mentioned previously, it’s a lot lower than it was before. In terms of getting real-time working, it’s pretty easy to add that to an Apollo app.