The industry-standard GraphQL server (Apollo Server) and client (Apollo Client). Provides a complete solution for building and consuming GraphQL APIs, with caching, subscriptions, and Apollo Studio for monitoring.
Building a GraphQL API server from scratch
React apps that need smart client-side GraphQL caching
Complex data graphs with nested relationships and real-time subscriptions
What drives the Trust Score
Last 12 months
Simple REST APIs — GraphQL adds overhead for CRUD
End-to-end TypeScript monorepos — tRPC has better type safety with less boilerplate
You just need schema validation — plain Zod is much simpler
Free tier & paid plans
Open source (MIT)
Apollo Studio managed from $59/mo
Self-hosted is fully free; Apollo Studio adds observability
Other options worth considering
End-to-end typesafe APIs for TypeScript monorepos. Eliminates the need for code generation or a schema — your TypeScript types ARE your API contract. Pairs perfectly with Next.js.
Complementary tools that pair well with Apollo GraphQL
Docs, videos, tutorials, and courses
Repository and installation options
View on GitHub
github.com/apollographql/apollo-server
npm install @apollo/server graphqlnpm install @apollo/client graphqlCopy and adapt to get going fast
import { ApolloServer } from '@apollo/server';
import { expressMiddleware } from '@apollo/server/express4';
import express from 'express';
const server = new ApolloServer<{ userId: string }>({
typeDefs,
resolvers,
});
await server.start();
const app = express();
app.use('/graphql', express.json(), expressMiddleware(server, {
context: async ({ req }) => ({ userId: req.headers['x-user-id'] as string }),
}));
app.listen(4000, () => console.log('Server on http://localhost:4000/graphql'));Common usage patterns
Apollo Server with Next.js API route
Embed a GraphQL server inside a Next.js route handler
// app/api/graphql/route.ts
import { ApolloServer } from '@apollo/server';
import { startServerAndCreateNextHandler } from '@as-integrations/next';
const server = new ApolloServer({
typeDefs: `
type Query { posts: [Post!]! }
type Post { id: ID! title: String! }
`,
resolvers: {
Query: { posts: () => db.post.findMany() },
},
});
const handler = startServerAndCreateNextHandler(server);
export { handler as GET, handler as POST };Apollo Client with React
Fetch and cache GraphQL data in a React component
import { ApolloClient, InMemoryCache, ApolloProvider, gql, useQuery } from '@apollo/client';
const client = new ApolloClient({
uri: '/api/graphql',
cache: new InMemoryCache(),
});
const GET_POSTS = gql`
query GetPosts {
posts { id title }
}
`;
function Posts() {
const { loading, error, data } = useQuery(GET_POSTS);
if (loading) return <p>Loading...</p>;
if (error) return <p>Error: {error.message}</p>;
return <ul>{data.posts.map(p => <li key={p.id}>{p.title}</li>)}</ul>;
}
export default function App() {
return <ApolloProvider client={client}><Posts /></ApolloProvider>;
}Real experiences from developers who've used this tool