What is the best way to set up a GraphQL server?

This page summarizes the projects mentioned and recommended in the original post on reddit.com/r/learnprogramming

Our great sponsors
  • OPS - Build and Run Open Source Unikernels
  • Scout APM - Less time debugging, more time building
  • SonarQube - Static code analysis for 29 languages.
  • GitHub repo apollo-server

    🌍  Spec-compliant and production ready JavaScript GraphQL server that lets you develop in a schema-first way. Built for Express, Connect, Hapi, Koa, and more.

    Apollo Server GitHub Repository

  • GitHub repo express-graphql

    Create a GraphQL HTTP server with Express.

    express-graphql GitHub Repository

  • OPS

    OPS - Build and Run Open Source Unikernels. Quickly and easily build and deploy open source unikernels in tens of seconds. Deploy in any language to any cloud.

  • GitHub repo graphql-yoga

    🧘 Rewrite of a fully-featured GraphQL Server with focus on easy setup, performance & great developer experience. The core of Yoga implements W3C Fetch API and can run/deploy on any JS environment.

    Yoga GitHub Repository

  • GitHub repo apollo-studio-community

    🎡  GraphQL developer portal featuring an IDE (Apollo Explorer), auto-documentation, metrics reporting, and more. This repo is for issues, feature requests, and preview docs. 📬

    That's why I've been using NestJS instead. NestJS is a larger framework built on top of the Express and Fastify HTTP servers. It supports code-first and schema-first GraphQL endpoints (or even a combination of the two!) and like I mentioned, uses Apollo Server under the hood, so all the options that are usually available, will be here as well. Such as toggling the Playground, and connecting to Apollo Studio for tracing, error logs, production Playground, etc. It also comes with great integrations for packages like PassportJS, TypeORM or MikroORM, and JWT. The docs are really good, too, so for a beginner it's a great place to not only get started, but scale and build larger applications later on.

  • GitHub repo graphql-helix

    A highly evolved GraphQL HTTP Server 🧬

    Apollo Server can be setup on its own, or as middleware for popular HTTP servers such as Express and Fastify. Apollo Server is also the default server used by the @nestjs/graphql module, if you decide to use NestJS, and TypeGraphQL's schemas can be injected into either of the three options I mentioned, as well as others such as Helix.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts