GraphQL Servers

Connect any backend to GraphQL.

Easily build a GraphQL API that connects to one or more
REST APIs, microservices, or databases.


Building a GraphQL server

A GraphQL server is a thin translation layer over your existing backends. It's easy to write one:

  1. Describe your data with a schema
  2. Write resolvers that fetch the fields in your schema from your existing backend
  3. Pass through authentication information from the request to the backends

You can use JavaScript, as in the example to the right, or any language you're already familiar with.

JavaScript tutorial

Selecting a library

Apollo Client, Engine, and other components work with every server library that supports the GraphQL spec. Some libraries have additional features that make GraphQL nicer to run in production, such as support for performance tracing or transport batching.

Apollo Server
JavaScript
Sangria
Scala
GraphQL-Java
Java
GraphQL-Ruby
Ruby
Absinthe
Elixir
The whole GraphQL spec
GraphQL schema language
Transport batching
GraphQL Subscriptions
Apollo Tracing
Apollo Cache Control

If your favorite library doesn't have one of these features, we'd love to help you contribute. Join the #contributing channel in Apollo Slack.

Apollo server libraries

We maintain a set of JavaScript libraries to help frontend developers start using GraphQL fast.

Apollo Server

graphql-tools

GraphQL Subscriptions

Easily bind a GraphQL endpoint to any Node.js HTTP server.

Attach a JavaScript GraphQL schema to any Node server platform, including Express, Hapi, Koa, AWS Lambda, and more. Easily use advanced features like batching, tracing, and cache control.

Build, mock, manipulate, and stitch GraphQL schemas.

graphql-tools gives you convenient ways to create and manipulate GraphQL schemas. Write a schema using the concise schema language, mock it in one line of code, or even stitch multiple APIs together.

The websocket transport for realtime GraphQL data.

subscriptions-transport-ws is the most widely used transport for GraphQL subscriptions. With this package it's easy to wire up your server and client for realtime data push with GraphQL.

Apollo Server

Easily bind a GraphQL endpoint to any Node.js HTTP server.

Attach a JavaScript GraphQL schema to any Node server platform, including Express, Hapi, Koa, AWS Lambda, and more. Easily use advanced features like batching, tracing, and cache control.

graphql-tools

Build, mock, manipulate, and stitch GraphQL schemas.

graphql-tools gives you convenient ways to create and manipulate GraphQL schemas. Write a schema using the concise schema language, mock it in one line of code, or even stitch multiple APIs together.

GraphQL Subscriptions

The websocket transport for realtime GraphQL data.

subscriptions-transport-ws is the most widely used transport for GraphQL subscriptions. With this package it's easy to wire up your server and client for realtime data push with GraphQL.

Launchpad

Quickly view, edit, and create GraphQL servers in the cloud.

Examples

We created Launchpad to be a quick way to share examples of GraphQL server code. Check them out:

Specifications

In addition to some useful libraries and tools, the Apollo community maintains some specifications that use available extension points in GraphQL to add additional functionality. These extensions are implemented in a variety of servers, and they integrate with Apollo Client and Engine to give you a great end-to-end GraphQL experience.

Apollo Tracing

Read the specification on GitHub »

Apollo Tracing is a GraphQL response extension that allows a server to report performance data. This can be consumed by Apollo Engine or any other tool to provide a visualization of field-by-field execution performance. It's supported by most GraphQL server implementations, including Node.js, Ruby, Scala, Elixir, and more.

Apollo Cache Control

Read the specification on GitHub »

Apollo Cache Control is a GraphQL response extension that can inform server-side or client-side GraphQL caches. It describes a format for a GraphQL API to return information about cache expiration and invalidation, as well as some controls that a client can use to override caching.

Join Apollo Slack
Thank you! Check your email for your invite.