James Baxley is an Open Source Developer at Apollo. He is currently the lead of the Apollo Client Project making GraphQL easy to use in all applications. He's also a part-time beekeeper.
Apollo 2.0 is a "universal GraphQL" client. What is "universal GraphQL"? By the end of this talk, you'll understand what that means. There are four main features of the new Apollo client:
It comes down to describing your data.
GraphQL is the language of your data. It's an adjustment from the REST mentality of "I want this general set of data" to describing exactly what data you want and having the server fulfill your request.
Using a descriptive language as the go-between for your client and server keeps things uniform and simple to reason about. No unnecessary fields, no unnecessary surplus.
Using GraphQL built-in features such as arguments, fragments, and directives, you can create expressive and safe ways to query and update your data.
Apollo Client is the most popular GraphQL client for the web and React Native applications. It's designed for ease of use, but is powerful enough for production applications.
With support for advanced type-generation based on schema knowledge, Apollo iOS and Apollo Android bring GraphQL to your native application with ease.
GraphQL Tools allows you to create a GraphQL Server through describing the shape of your schema. It makes it easy to create a production-ready server in minutes.
This is all well and good, but we realized, we began to think about what else could we do with GraphQL?
Our team universally uses GraphQL at this point. But what else can we do? What does tomorrow look like?
What if you could use different data sources? The spec is independent of what data sources you use. What if you could stream some results? What if you could manage all your application state (in lieu of something like Redux)? What if you could use existing REST endpoints (things you haven't gotten around to migrating to GraphQL)?
You can stream your UI to browsers as well as your data to components as efficiently as possible via
react in Apollo.
With Apollo Client 2.0, you can store, update, and read your local application state with the same power and simplicity your team has come to love using GraphQL.
Make it easy to incrementally adopt GraphQL without adding a new backend. Apollo lets you do this with the
With Apollo Client 2.0, you can use store, update, and read your local application state with GraphQL, so you don't have learn a new language. You render with React and you manage data as GraphQL with Apollo.
Using directives, we can define from where to resolve our data and how it should be represented across environments.
But there's still a gap between data and rendering. There's three ways you can connect those dots.
James thinks Apollo link is the most exciting part of Apollo 2.0.
Fetching remote data is the cornerstone of nearly every tool that developers use. From the time you run npm install, to monitoring your server logs, data is constantly moving from one place to the other. Apollo Link is a request primitive designed for the GraphQL age.
Create components that manage the control flow of data request and reuse them everywhere.
Piggybacking in GraphQL's introspection ability, you can create dynamic endpoints that are always up to date. You can mix and match API microservices and third parties to build the request shape your app needs. `
Apollo Engine is a layer in your stack that sits between your client and your server to make your GraphQL app easier to understand and more performant.
Some other possibilities include:
Apollo Client 2.0 is "one small step for GraphQL, one giant leap for data". When will it be available?... Now! He "live merges" the Apollo Client 2.0 pull request.