talira

GraphQL.js

The JavaScript reference implementation of GraphQL: build a schema and execute queries against it

open sourceMITfree

GraphQL.js is the JavaScript reference implementation of GraphQL, the query language for APIs. It builds a type schema that maps to your code and executes queries, mutations and subscriptions against it, with parsing, validation and error handling, and it's the engine most JavaScript GraphQL servers and tools are built on. It runs in Node.js, Bun and the browser, and is published on npm as graphql.

Problems it solves

  • serve a GraphQL API from my Node.js backend
  • validate and execute GraphQL queries in JavaScript without a full server framework
  • build a GraphQL schema in TypeScript and run queries against it in tests

Features

  • builds a GraphQL type schema from your code
  • parses, validates and executes queries against the schema
  • subscriptions and error handling
  • runs in Node.js, Bun and the browser

Limitations

  • Only the latest major version gets full support; the previous one gets fixes for 12 months after a new major, and older versions get none.1

Alternatives

The same job

These do what GraphQL.js does.

  1. Apollo Server Spec-compliant GraphQL server for Node.js, standalone or as Express middleware

Compare GraphQL.js with the top 3