Apollo Server is a library that helps you connect a GraphQL schema to an HTTP server in Node. If you want to get started quickly, take a look at the end-to-end example.
This server can be queried from any GraphQL client, since it supports all of the common semantics for sending GraphQL over HTTP, as documented on graphql.org. Apollo Server also supports some small extensions to the protocol, such as sending multiple GraphQL operations in one request. Read more on the sending requests page.
GraphQL server tutorial
If you’re just getting started writing GraphQL servers, check out our recently updated tutorial which walks you through building a server from start to finish: How To Build a GraphQL Server to talk to SQL, MongoDB, and REST
Selecting the right package
Apollo Server is actually a family of npm packages, one for each Node.js HTTP server library.
Pick the one below that suits your needs:
# Pick the one that matches your server framework
If you don’t see your favorite server there, file a PR!
At the end of the day, Apollo Server is a simple, production-ready solution without too many features. Here’s what you can do with it:
- Attach a GraphQL schema to your HTTP server to serve requests
- Attach GraphQL and GraphiQL via separate middlewares, on different routes
- Accept queries via GET or POST
- Support HTTP query batching
- Support Apollo Tracing to get performance information about your server
- Support Apollo Cache Control to inform caching gateways such as Apollo Engine
Apollo Server is built with the following principles in mind:
- By the community, for the community: Apollo Server’s development is driven by the needs of developers using the library.
- Simplicity: Keeping things simple, for example supporting a limited set of transports, makes Apollo Server easier to use, easier to contribute to, and more secure.
- Performance: Apollo Server is well-tested and production-ready.