Skip to content

Apollo Server vs Graphile

Which should you use? A side-by-side look at what each one does, who it suits, what it costs, how hard it is to set up, and where each falls short.

Apollo Server

Open source · MIT

A JavaScript GraphQL server that works with Express, Koa, Hapi and similar Node frameworks.

Graphile

Open source · MIT

A monorepo of GraphQL tools, including Grafast and PostGraphile for building APIs from PostgreSQL.

The short answer

Choose Apollo Server if you need…

  • Node.js developers who want to add a GraphQL API to an existing Express, Koa or Hapi app
  • Teams that prefer defining a schema first and then implementing resolvers
  • Developers who want a widely used, MIT-licensed GraphQL server in TypeScript

Choose Graphile if you need…

  • Developers who have a PostgreSQL database and want an auto-generated GraphQL API
  • Teams building custom GraphQL schemas who care about server efficiency
  • Developers who want a GraphQL API they can still customise heavily
  • Developers looking for individual Node.js libraries for SQL building or Postgres introspection

Side-by-side

Apollo ServerGraphile
TypeLibraryFramework
PriceFree and open sourceFree and open source
LicenceMITMIT
GitHub stars14k12.9k
Setup difficultyIntermediateAdvanced
How you get itInstall with a package managerInstall with a package manager
Main languageTypeScriptTypeScript
Last code update5 days ago4 days ago

What each one is

Apollo Server

Apollo Server is a JavaScript library for running a GraphQL API on Node.js. You describe your data with a GraphQL schema and write resolver functions that fetch the data for each field. It plugs into common Node web frameworks so clients can send GraphQL queries over HTTP. The description says it is spec-compliant and built for a schema-first way of working.

Graphile

This repository holds many related open-source packages from Graphile, a project focused on GraphQL. The two headline projects are Grafast, a planning and execution engine that can replace the execute method in GraphQL.js, and PostGraphile, which builds a GraphQL API automatically from a PostgreSQL database. Other packages, such as pg-sql2 for building SQL queries and pg-introspection for reading database structure, can be used on their own.

Best for

Apollo Server

  • Node.js developers who want to add a GraphQL API to an existing Express, Koa or Hapi app
  • Teams that prefer defining a schema first and then implementing resolvers
  • Developers who want a widely used, MIT-licensed GraphQL server in TypeScript

Graphile

  • Developers who have a PostgreSQL database and want an auto-generated GraphQL API
  • Teams building custom GraphQL schemas who care about server efficiency
  • Developers who want a GraphQL API they can still customise heavily
  • Developers looking for individual Node.js libraries for SQL building or Postgres introspection

Strengths

Apollo Server

  • Built to follow the GraphQL spec and designed for production use, per its description
  • Works with several popular Node.js web frameworks
  • Open source under the MIT license with a large community (about 14,000 stars)

Graphile

  • Covers a range of related GraphQL and PostgreSQL tools in one place
  • Several packages can be used independently of the rest
  • MIT licensed and actively maintained, with a recent push to the repository

Not ideal for

Apollo Server

  • People who only need a REST API or static site, since GraphQL adds a layer they would not use
  • Non-programmers, because it requires writing server code in JavaScript or TypeScript
  • Projects that need a non-Node.js server language, since this library runs only on Node.js

Graphile

  • People who do not use PostgreSQL, since PostGraphile is designed around it
  • People who need the legacy PostGraphile V4, which lives on a separate branch
  • Beginners with no Node.js or GraphQL experience, as the README assumes familiarity with both

Trade-offs

Apollo Server

  • Requires working knowledge of GraphQL concepts such as schemas and resolvers
  • The README excerpt provided is truncated, so details on configuration and advanced features could not be verified here
  • Being a JavaScript/TypeScript library, it is only useful within the Node.js ecosystem

Graphile

  • The README is truncated and gives limited setup detail, so setup is not clear from this text alone
  • Many packages and concepts make the monorepo hard to navigate for newcomers
  • Some packages are niche and the README itself recommends alternatives for one of them

Getting started

Apollo Server

Install the server package

npm install @apollo/server graphql
Step-by-step guide: how to use Apollo Server

Graphile

Clone the repository

git clone https://github.com/graphile/crystal
Step-by-step guide: how to use Graphile

Frequently asked questions

What is the difference between Apollo Server and Graphile?

Apollo Server: A JavaScript GraphQL server that works with Express, Koa, Hapi and similar Node frameworks. Graphile: A monorepo of GraphQL tools, including Grafast and PostGraphile for building APIs from PostgreSQL. Apollo Server suits node.js developers who want to add a graphql api to an existing express, koa or hapi app, while Graphile suits developers who have a postgresql database and want an auto-generated graphql api.

Are Apollo Server and Graphile free?

Apollo Server: Free and open source. Graphile: Free and open source.

Which is easier to set up, Apollo Server or Graphile?

Apollo Server is easier to get started with (rated intermediate); Graphile is rated advanced and usually needs more setup.

Is Apollo Server or Graphile more popular?

Apollo Server has more GitHub stars (14k) than Graphile (12.9k). Popularity isn't the same as fit — check which one matches your use case above.

What are other alternatives to Apollo Server and Graphile?

Other options people compare them with include Apollo Client, Koa, GraphQL.js.

Keep comparing

Built from our catalogue entries for both products: open-source details come from each project's README (AI-assisted, refreshed weekly) and GitHub data; AI-tool details are editorial. Spotted something wrong? Let us know from either product's page.