graphql

graphql/graphql-js

TypeScript MIT Web Dev

A reference implementation of GraphQL for JavaScript

20.4k stars
2.1k forks
active
GitHub +69 / week

20.4k

Stars

2.1k

Forks

90

Open issues

30

Contributors

v17.0.2 03 Jul 2026

AI Analysis

GraphQL.js is the official JavaScript reference implementation of GraphQL, a query language for APIs. It enables developers to build GraphQL schemas and execute queries against them in Node.js and browser environments. This project is essential for anyone building GraphQL APIs in JavaScript and serves as the canonical implementation that other libraries reference.

Web Dev Library Discovery value: 2/10
Documentation 9/10
Activity 9/10
Community 9/10
Code quality 8/10

Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.

Overall score 9/10

AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.

graphql query-language api reference-implementation schema-building
Actively maintained Well documented MIT licensed Popular Beginner friendly Production ready
Deep Analysis · Based on README and public signals
7h ago

GraphQL.js: The canonical JavaScript implementation that underpins most Node.js GraphQL tooling

GraphQL.js is the reference implementation of the GraphQL specification for JavaScript/TypeScript, originally created by Facebook and now stewarded by the GraphQL Foundation. It provides the core runtime for parsing, validating, and executing GraphQL queries, and serves as the foundational dependency for nearly every major GraphQL server and tooling library in the Node.js ecosystem — including Apollo Server, Yoga, Pothos, and many others. It is used by organizations of all sizes that expose or consume GraphQL APIs in JavaScript environments.

Origin

Created by Facebook in 2015 alongside the public GraphQL specification release, graphql-js has served as both the spec reference and the practical runtime for over a decade. It migrated to the GraphQL Foundation under the Linux Foundation and converted to TypeScript in later major versions.

Growth

Growth tracked closely with GraphQL adoption broadly — accelerating significantly between 2018–2022 as GraphQL became a mainstream API pattern. Star growth has slowed (69 stars/7 days) because the project is already deeply embedded infrastructure; npm download volumes matter far more than stars at this maturity level. The project is well past its rapid-growth phase and is now stable foundational infrastructure.

In production

Used as a direct or transitive dependency by Apollo Server, GraphQL Yoga, Nexus, Pothos, TypeGraphQL, and dozens of other widely-deployed libraries. npm weekly downloads consistently in the tens of millions range. This is one of the most widely deployed JavaScript packages in the GraphQL ecosystem; adoption is extensively documented through downstream dependency graphs and ecosystem tooling reliance.

Code analysis
Architecture

Appears to be a modular TypeScript library exporting distinct capabilities: schema building (type definitions, schema construction), query parsing, validation, and execution. Based on the README, it distributes both CommonJS and ESModule builds with a package.json exports map, supporting Node.js servers and browser bundlers equally. Likely organized around the core GraphQL request lifecycle — parse → validate → execute.

Tests

README references a tests directory (src/__tests__) that mirrors the official GraphQL specification README examples, suggesting specification-level test coverage. Exact coverage percentage is not documented in README, but the approach implies high correctness alignment with the spec.

Maintenance

Last push on 2026-07-03, seven days before the evaluation date — actively maintained. The README references a current 17.x.x branch with CI badge. Version support policy is documented (latest + previous major). Contributions require GraphQL Specification Membership (CLA), which is standard for Foundation-managed projects. Maintenance posture is strong for a mature foundational library.

Honest verdict

ADOPT IF: you are building any GraphQL server, schema tool, or developer tooling in JavaScript or TypeScript — this is the unavoidable foundational dependency and there is no practical alternative in the JS ecosystem. AVOID IF: you are building in a different language runtime (Go, Java, Rust, Python) where language-specific implementations exist; or if you need GraphQL features not yet ratified in the spec, as graphql-js tracks the spec conservatively. MONITOR IF: you depend on specific major version behavior and are sensitive to breaking changes across major releases, given that only the latest and one prior major version receive ongoing support.

Independent dimensions

Mainstream potential

9/10

Technical importance

9/10

Adoption evidence

10/10

Risks
  • Foundation governance processes can slow feature velocity compared to a single-company project; spec-alignment conservatism means new GraphQL features may lag community demand.
  • Major version upgrades (e.g., v16 to v17) have historically introduced breaking changes that propagate across the entire ecosystem, creating upgrade coordination challenges for downstream library maintainers.
  • EasyCLA membership requirement for contributions may create friction for casual contributors, potentially narrowing the active contributor base over time.
  • As a reference implementation, graphql-js optimizes for correctness over raw performance; high-throughput production deployments may find it beneficial to profile against more performance-focused alternatives or custom execution layers.
  • The library's central position means any significant security vulnerability would have broad ecosystem impact, though the Foundation's maintenance posture reduces this risk meaningfully.
Prediction

graphql-js will remain the definitive JavaScript GraphQL runtime for the foreseeable future. Incremental improvements toward better performance and incremental delivery (e.g., @defer/@stream) are likely to continue tracking spec evolution steadily.

0 found this helpful

Newsletter

Get analyses like this every Monday

Free weekly digest of the most interesting open-source discoveries.

Languages

TypeScript
58.6%
MDX
37.3%
JavaScript
3.9%
CSS
0.2%

Information

Language
TypeScript
License
MIT
Last updated
1w ago
Created
134mo ago
Analyzed with
anthropic/claude-haiku-4-5

Stars over time

Loading…

Contributors over time

Top 100 contributors only — repos with more will plateau at 100.

Loading…

Similar repos

graphql

graphql/graphql-spec

This is the official GraphQL language specification repository, maintained by...

14.6k JavaScript Dev Tools
graffle-js

graffle-js/graffle

Graffle is a minimal, type-safe GraphQL client for JavaScript that emphasizes...

6.1k TypeScript Web Dev
graphql-go

graphql-go/graphql

A Go implementation of GraphQL that follows the official graphql-js reference...

10.2k Go Web Dev
graphql-java

graphql-java/graphql-java

GraphQL Java is a mature, specification-compliant GraphQL implementation for...

6.2k Java Web Dev
graphql

graphql/graphiql

GraphiQL is the official reference implementation of a GraphQL IDE, provided as...

16.9k TypeScript Dev Tools
vs. alternatives
graphql-spec

The specification document that graphql-js implements — not a competing library but the normative reference. graphql-js is the executable embodiment of that spec.

graphql-go/graphql

The Go equivalent of graphql-js. Serves the same role in the Go ecosystem. Not a competitor for JS/TS users but demonstrates the pattern of language-specific reference implementations.

graphql-java/graphql-java

Java equivalent. Similarly positioned as foundational infrastructure in the JVM ecosystem. No overlap with graphql-js use cases.

graffle-js/graffle

A TypeScript-first GraphQL client library, not a server runtime or spec implementation. Operates at a higher abstraction layer and likely depends on graphql-js internally for parsing/validation.

graphiql

The GraphQL IDE tool, which itself uses graphql-js as a dependency for in-browser query parsing and validation. Complementary, not competing.