Web
iOS
Android
Help your team focus on what your product needs, not how to get it. Declare your data and Apollo Client will handle the rest. Never worry about caching, network status, or getting data into your UI ever again.
import { gql, useQuery } from '@apollo/client';
const Username = () => {
const { loading, error, data } = useQuery(gql`
{
me {
username
}
}
`);
if (loading) return <text>Loading...</text>;
if (error) return (
<text>Error! ${error.message}</text>
);
if (!data || !data.user) return (
<text>Could not find user :(</text>
);
return (
<text>Your username: {data.me.username}</text>
);
}
We believe in giving developers access to powerful open source tools. You will never be asked to pay for Apollo Client. Ever.
Apollo Client is a way to consume a graph. Apollo, as a company, gives you multiple libraries to this that are suited to wherever you’re building your app: web, ios, and android. Apollo Client is about binding your data to your UI with GraphQL.
Write a query and receive data without manually tracking loading, error, or network states.
Cut down on network traffic and keep data consistent throughout your application with Apollo Client’s normalized reactive data cache.
Enjoy cross stack type safety, runtime cache inspectors, and full featured editor integrations to keep you writing applications faster.
Use any build setup and any GraphQL API. Drop Apollo Client into any app seamlessly without re-architecting your entire data strategy.
Take advantage of modern UI architectures in the web, iOS, and Android ecosystems.
Share knowledge with thousands of developers, thanks to our active open source community.
Any library or framework can send a query to a GraphQL endpoint. Where Apollo Client shines is in its result caching. It uses a normalized cache to dramatically speed up the feel of your application. By reducing the number of network requests made to your GraphQL server, the cache improves the responsiveness of your application client while automatically keeping UI components up to date as new data is fetched.
Visit Docs"Apollo is the de facto standard GraphQL implementation, but we were also pleasantly surprised to find built-in support for things like caching, deduplication, and error handling. You just write the code that’s specific to interacting with your backend, and Apollo takes care of the rest."
Neil Lokare @ Nerdwallet
"In a build vs. buy decision, Apollo Platform was a clear buy. We wanted to deliver the promise of GraphQL to our developers now rather than later."
Mark Stuart @ PayPal
"We have developed a very close working relationship with the Apollo team. We talk to them almost every day, which is critical to ensuring that we can help our customers through both good times and difficult times."
Sankha Pathak @ Glassdoor
Specify the data you want with a GraphQL query and Apollo Client gets it for you automatically. Then, simply add on advanced data management features as you need them.
Visit DocsCache Policies
Reactivity
Pagination
Subscriptions
React
const cache = new InMemoryCache({
typePolicies: {
Person: {
fields: {
name: {
read(name) {
// Return cached name, upper-cased:
return name.toUpperCase();
}
}
},
},
},
});