# RPC and GraphQL libraries

Define an API with types and serve it, as remote procedure calls or as GraphQL. Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 21 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.

| Rank | Project | Overall | Needed by many | Helps a lot | Holds up over time | Used widely | Vouched for | Safe | Best for |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 1 | [tRPC](https://elestia.ai/opensource/api-layers/trpc/index.md) | 8.2 | 5.9 | 8.3 | 8.1 | 6.9 | 7.5 | 7.4 | Full-stack TypeScript teams, especially on Next.js with TanStack Query, who own both client and server and want types shared without code generation. |
| 2 | [GraphQL Yoga](https://elestia.ai/opensource/api-layers/graphql-yoga/index.md) | 8.0 | 5.2 | 8.3 | 8.2 | 6.5 | 6.8 | 7.5 | Teams building a GraphQL API that must run on any JS runtime or the edge, with plugins, subscriptions and federation included. |
| 3 | [Pothos](https://elestia.ai/opensource/api-layers/pothos/index.md) | 7.9 | 4.0 | 8.5 | 7.7 | 4.6 | 6.3 | 7.8 | TypeScript teams building a GraphQL API who want inferred types without decorators or codegen, especially with Prisma or Drizzle. |
| 4 | [oRPC](https://elestia.ai/opensource/api-layers/orpc/index.md) | 7.8 | 6.1 | 8.3 | 7.2 | 6.0 | 5.8 | 7.1 | TypeScript teams that want tRPC-style types and also an OpenAPI/REST API, any frontend framework, or contract-first development. |
| 5 | [GraphQL.js](https://elestia.ai/opensource/api-layers/graphql-js/index.md) | 7.6 | 5.1 | 7.8 | 8.1 | 8.0 | 8.2 | 8.6 | GraphQL server, tooling and framework authors, and teams that want spec-exact GraphQL execution under any server. |
| 6 | [Connect](https://elestia.ai/opensource/api-layers/connect/index.md) | 7.5 | 4.3 | 7.9 | 7.9 | 5.1 | 6.8 | 8.2 | Teams that share a Protobuf API between a TypeScript front end or Node service and backends in Go, Rust, Java or other languages. |
| 7 | [Apollo Server](https://elestia.ai/opensource/api-layers/apollo-server/index.md) | 7.2 | 4.5 | 7.5 | 7.0 | 6.1 | 7.3 | 7.1 | Teams building GraphQL APIs or federated subgraphs on Node.js that use Apollo's tooling (GraphOS, Router, Studio) or NestJS's Apollo driver. |
| 8 | [Mercurius](https://elestia.ai/opensource/api-layers/mercurius/index.md) | 6.9 | 3.6 | 7.6 | 7.1 | 4.4 | 5.8 | 6.7 | Teams already on Fastify (or NestJS with the Fastify adapter) that want a fast GraphQL server with subscriptions, caching and JIT built in. |
| 9 | [TypeGraphQL](https://elestia.ai/opensource/api-layers/type-graphql/index.md) | 5.0 | 3.9 | 5.7 | 4.1 | 5.2 | 4.8 | 5.9 | Teams that already use class-and-decorator TypeScript, often with class-validator or TypeORM, and want their GraphQL schema built the same way. |
| 10 | [ts-rest](https://elestia.ai/opensource/api-layers/ts-rest/index.md) | 1.7 | 5.2 | 5.3 | 0.6 | 3.9 | 3.0 | 5.2 | Teams that already run ts-rest and need time to plan a move to oRPC or to a fork. It is not for new projects. |

## The numbers

| Project | Downloads, 4 weeks | In a year | GitHub stars | Commits, 12 months | Last npm release | Advisories, 24 months |
| --- | --- | --- | --- | --- | --- | --- |
| tRPC | 32M | ×5.1 | 41k | 559 | Nov 2026 | 2 |
| GraphQL Yoga | 12M | ×4.7 | 8.5k | 300 | Nov 2026 | 0 |
| Pothos | 2.7M | ×5.5 | 2.6k | 1k | Nov 2026 | 0 |
| oRPC | 12M | ×36 | 5.8k | 938 | Nov 2026 | 1 |
| GraphQL.js | 282M | ×3.4 | 20k | 645 | Nov 2026 | 0 |
| Connect | 35M | ×15 | 1.8k | 145 | Oct 2026 | 0 |
| Apollo Server | 16M | ×2.7 | 14k | 52 | Nov 2026 | 2 |
| Mercurius | 1.4M | ×4.0 | 2.5k | 70 | Nov 2026 | 2 |
| TypeGraphQL | 4.3M | ×3.7 | 8.1k | 24 | Feb 2026 | 0 |
| ts-rest | 4M | ×4.7 | 3.3k | 1 | Mar 2025 | 0 |

All categories: https://elestia.ai/opensource/index.md
