REST vs GraphQL vs gRPC — API Design for Mid-Market Companies 2026

Software Development · May 2026 · 14 min read

← Part of the Software Development Guide
Hakan Akcan By Hakan Akcan · Reepa Solutions

APIs are, in 2026, the real core of value in almost every business application — web frontends, mobile apps, partner integrations, AI agents and internal microservices all communicate via APIs, and the choice of protocol determines development speed, operational costs and long-term maintainability. For mid-market companies, three questions come up repeatedly in our consulting work: first, whether REST is still sufficient for the next growth stage or whether GraphQL can stop the constant endpoint explosion; second, when gRPC delivers genuinely measurable benefits for internal services; and third, how to version an API so that five years of releases are possible without customer complaints. This article positions REST, GraphQL, gRPC, tRPC, Webhooks and event streaming for mid-market businesses, provides a concrete decision matrix and covers the most important cross-cutting concerns: authentication, rate limiting and documentation. For context within the overall architecture, see our Software Development Guide for Mid-Market Companies.

Why API design really matters in 2026

Three developments are noticeably reshaping the API landscape in 2026. First, mobile apps, single-page frontends and AI agents have multiplied the volume of API calls per end user compared to 2020 — a modern web app easily triggers 200 to 500 API calls per session, and an AI agent can issue two- to three-digit tool calls per request. Second, NIS2 now requires operators of essential facilities to document interface security for the first time, including audit logs, rate limiting and an authentication concept — an API without a gateway layer is increasingly flagged during audits. Third, API schemas via OpenAPI 3.1, GraphQL Federation and Protobuf are becoming the contractual foundation between teams and suppliers — those who do not maintain a clean contract pay the price in integration overhead with every new partner.

Operationally, the biggest trap is not the choice of protocol, but a lack of discipline. APIs without a documented schema, without a versioning strategy and without a gateway layer produce maintenance costs many times higher than the original development cost — we have advised several mid-market companies who, after three years, were dragging along over 400 unused REST endpoints because no one had tracked the sunset date. One observation from audits: companies that invested early in OpenAPI schemas, a gateway layer and a central developer portal typically achieve 30 to 50 percent shorter onboarding times for new partners and save measurable days during audits.

In practice, this means the protocol choice is important, but secondary compared to the cross-cutting disciplines of schema, versioning, authentication and documentation. A well-documented REST API is almost always better than an undocumented GraphQL API. The following sections cover the five relevant protocol approaches and close with a decision matrix.

REST — proven patterns, versioning, HATEOAS, OpenAPI

REST remains the default protocol for external APIs in 2026, and for good reason: every browser, every HTTP tool, every framework generator understands REST natively, the caching layer via HTTP cache headers comes free of charge, and the tooling landscape with Postman, Insomnia, Bruno, curl and httpie is unmatched. For most mid-market public APIs, REST with OpenAPI 3.1 is the right choice as long as the endpoint count stays below 100.

Three disciplines determine maintainability. First, the pattern: think resource-oriented (nouns not verbs, /invoices/123/items instead of /getInvoiceItems), use HTTP verbs semantically (GET idempotent, POST creates, PUT replaces, PATCH modifies, DELETE removes), choose status codes precisely (201 on creation, 409 on conflict, 422 on validation error). Second, versioning: URL versioning with /v1/ is the easiest to document and is standard for external APIs. A clearly communicated sunset period is essential — GitHub's convention of at least twelve months transition time is a solid template. Third, HATEOAS — the concept that responses include links to subsequent actions. In practice, HATEOAS is rarely implemented in full because clients rarely use the links. A pragmatic approach is to include pagination links (next, prev, self) in list responses.

OpenAPI 3.1 is today the de facto standard for REST schemas. The specification fully covers JSON Schema 2020-12, enabling bidirectional validation. From a single OpenAPI file you can automatically generate client SDKs for TypeScript, Python, Java and Go, spin up mock servers and feed documentation portals like Stoplight or Scalar directly. Anyone building REST APIs should treat OpenAPI not as a documentation afterthought, but as a contract-first artifact — schema before code, then code generation in both directions.

GraphQL — schema, N+1, Federation, Apollo vs Relay vs urql

GraphQL solves two problems that REST does not handle elegantly: over-fetching (the client receives more fields than needed) and under-fetching (the client must call multiple endpoints in sequence to render a single view). Instead, the client sends a query specifying the desired fields, and the server returns exactly those. For frontends with many different views — typically a mobile app plus a web app plus a partner portal all on the same data layer — GraphQL is a significant productivity gain.

The central risk of GraphQL is the N+1 problem: a single nested query can trigger hundreds of database calls if resolvers are implemented naively. The solution is DataLoader — a batching and caching layer that consolidates parallel resolver calls into a single database query. Anyone running GraphQL without the DataLoader pattern will feel the latency impact under growing load. A second risk is the complexity bomb: a maliciously deeply nested query can overload the server. Query depth limits, query cost analysis and persisted queries are the standard responses to this.

Federation — the ability to compose a GraphQL API from multiple sub-graphs — is mature in 2026 and stable in Apollo Federation v2, Hot Chocolate (for .NET) and WunderGraph. It solves the problem of a central schema becoming a bottleneck in large organisations. For mid-market companies with fewer than 30 developers, Federation is typically over-engineering — a monolithic GraphQL schema usually suffices for the first few years.

On the client side, the landscape in 2026 is straightforward: Apollo Client remains the broadest standard with comprehensive caching and a large community; Relay is for very large Facebook-style frontends with strict compiler discipline; urql is the leaner alternative for TypeScript projects that do not need the full Apollo stack. For server components in Next.js, Nuxt and SvelteKit, urql is often the pragmatic choice due to better SSR integration.

gRPC — Protobuf, HTTP/2, streaming, when it makes sense for mid-market APIs

gRPC is an RPC framework over HTTP/2 with Protobuf schemas as the contract. The advantages over REST are quantifiable: Protobuf serialisation is 3 to 10 times faster than JSON, payload size is 30 to 50 percent smaller, and HTTP/2 multiplexing allows many parallel requests over a single TCP connection. Four streaming modes (unary, server-streaming, client-streaming, bidirectional) cover cases that in REST can only be solved via WebSockets or Server-Sent Events.

For external customer-facing APIs in mid-market companies, gRPC is rarely the right choice because browser clients can only communicate with gRPC via the gRPC-Web bridge, and the tooling for external consumers is considerably thinner than for REST or GraphQL. However, gRPC is a strong fit for internal service-to-service communication once you operate three or more services in Go, Java, Rust or C#. The Protobuf schema definition as a single source of truth, automatic code generation in all major languages and the latency reduction compared to JSON-REST justify the initial learning investment.

A pragmatic architecture that we have seen work successfully at several mid-market companies: REST with OpenAPI externally (for browser clients, partners and documentation), gRPC between services internally (for latency and efficiency), plus events over Kafka or NATS for asynchronous decoupling. This three-layer architecture scales cleanly well into the hundreds of millions of calls per day.

Request a free API architecture consultation

Planning a new API or consolidating a sprawling REST landscape? We offer a free 30-minute introductory call — we assess your current interface estate, propose an appropriate protocol mix and provide a realistic migration path.

Request free API consultation

tRPC — type-safe between TS frontend and backend

tRPC is a TypeScript framework for type-safe RPCs without code generation. Server functions are imported directly into the client as types — frontend and backend share the same TypeScript type tree, and refactoring on the backend breaks the frontend at compile time, not at runtime. For TypeScript monorepos with Next.js, Nuxt or Remix, tRPC is the most productive choice in 2026 because the entire schema layer (OpenAPI, codegen, validation) is eliminated.

The limitations are clear: tRPC only works when both sides are TypeScript and ideally live in the same repository. As soon as a native mobile app, a Python data pipeline consumer or an external partner enters the picture, you need a language-independent schema — i.e. REST with OpenAPI or GraphQL. A pragmatic solution is the combination: tRPC for the internal Next.js app, REST or GraphQL for external consumers, both calling the same service layer functions. For overall stack selection, see our guide on Web App Development Stack 2026.

Webhooks and event-driven patterns (Kafka, NATS, SQS) as a complement

Synchronous APIs solve the pull pattern, but many business processes are asynchronous by nature — an order is placed, a delivery is created, an invoice is issued, a payment is recorded. Connecting these chains via synchronous REST calls creates fragile cascading coupling. Webhooks and event streaming are the complementary pattern layer.

Webhooks are the simplest form: the consumer registers a URL, and the provider calls it when events occur. The standard disciplines are signed payloads (HMAC-SHA256 with a shared secret), retry logic with exponential backoff, idempotency keys and a dead-letter queue for permanently failed deliveries. For webhook providers in the mid-market, the Svix library or a small custom worker service with BullMQ is pragmatic enough.

For internal architectures with higher throughput, message brokers are the right choice. Three alternatives are relevant in 2026: Apache Kafka — the standard for high-volume event streams with replay capability, suitable from five-digit events per second, but operationally demanding. NATS — lightweight, Go-based, JetStream as the persistence layer, well suited for mid-market setups and edge workloads. AWS SQS or Azure Service Bus — cloud-managed alternatives with pay-per-message pricing and minimal operational overhead. A rule of thumb: if you are processing fewer than 1,000 events per second, NATS or SQS is simpler than Kafka.

When to use what — decision matrix

The following matrix condenses the selection criteria for mid-market projects. It does not replace an architectural analysis, but helps with initial prioritisation.

Use caseRecommendationRationale
Public customer API for partnersREST + OpenAPI 3.1Broadest tooling acceptance, browser-native, easy to document
Mobile app + web app on the same data layerGraphQLPrevents over-fetching, one schema for many clients
Service-to-service internally, multiple languagesgRPC + ProtobufEfficiency, streaming, contract-first, codegen in all languages
Next.js/Nuxt monorepo, TypeScript onlytRPCType safety without codegen layer, fastest development
Asynchronous business processes, partner integrationWebhooks + signed payloadsSimple pattern, no broker infrastructure required on the consumer side
High-volume events internally (over 10k/s)Kafka or NATS JetStreamReplay, scalability, decoupling of producer and consumer

The most common sensible combination in the mid-market is three-layered: REST externally for maximum interoperability, gRPC or tRPC internally for efficiency, and events over NATS or Kafka for decoupling. Starting with GraphQL or gRPC for external APIs without a strong reason means paying the price in onboarding overhead for partner developers who are unfamiliar with the tooling.

Authentication — OAuth 2.1, OIDC, API keys, mTLS

The authentication layer must be chosen in 2026 based on the consumer type. Four options cover most mid-market requirements.

A pragmatic architecture combines OIDC for user logins, OAuth client credentials for service accounts and mTLS for the few B2B partners with particularly high security requirements. For integration into a microservices architecture, see our cluster on Monolith vs. Microservices.

Rate limiting and API gateways — Kong, Tyk, Apigee, AWS, KrakenD

An API gateway consolidates rate limiting, authentication, logging, caching and transformation logic into a single layer in front of your services. The five relevant options for mid-market setups are:

For rate limiting, the standard algorithms token bucket and sliding window cover 90 percent of cases. What matters is differentiation: per API key, per endpoint, per user group — a single global rate limit is usually too coarse. Standard HTTP headers X-RateLimit-Limit, X-RateLimit-Remaining and Retry-After should be included in every response so clients can adapt.

Documentation — Stoplight, Mintlify, Scalar, ReadMe

An API without good documentation is an API without consumers. Four documentation platforms are the relevant options for mid-market API providers in 2026:

A pragmatic approach is a self-hosted Scalar instance with the OpenAPI source drawn from the code repository, plus a version tag per major API version. Anyone working with external partners should also provide a sandbox environment with test credentials and offer a Postman or Bruno collection download.

Reepa API standards

Across our mid-market projects, nine standards have been established as a minimum after several audit iterations. They are not mandatory, but anyone breaking them should document and justify the deviation.

These standards can be put in place during a two-week API audit and save several times the initial effort over the lifetime of the API. They are also the foundation on which a SaaS build-out does not drown in technical debt after 18 to 24 months.

Frequently asked questions

When does GraphQL pay off compared to REST in the mid-market?

GraphQL pays off when multiple different clients — web, mobile, partner portals — access the same data layer and each needs different fields. As soon as the number of REST endpoints grows beyond 80 to 100 due to frontend-specific edge cases, or when the mobile team complains about over-fetching, GraphQL is a sensible consolidation. For small APIs with fewer than 30 endpoints, REST with OpenAPI is almost always easier to operate.

Is gRPC useful for mid-market APIs?

Rarely as an external customer-facing API in the classic mid-market, but very often valuable for internal service-to-service communication. If you operate multiple services in Go or Java that communicate with each other, gRPC with Protobuf schemas, HTTP/2 streaming and 5 to 10 times the efficiency of JSON brings clear advantages. Browser clients can only communicate with gRPC via the gRPC-Web bridge, which is why the external interface usually stays REST or GraphQL.

How does tRPC differ from GraphQL?

tRPC is a TypeScript-only RPC framework with no schema language — types are imported directly from server code into the client. This eliminates code generation and schema maintenance. tRPC is optimal when both frontend and backend are TypeScript and ideally live in the same monorepo. GraphQL is language-agnostic and better when multiple backend languages or external consumers are involved. tRPC is not a replacement for a public third-party API.

Do I need an API gateway if I only have one API?

Even with a single API, a gateway makes sense as soon as rate limiting, centralised authentication, IP filtering or audit logging are required — and exactly these requirements arise regularly with GDPR audits, NIS2 and larger B2B customers. For small setups, Kong OSS or KrakenD self-hosted is often sufficient; for cloud-first architectures, AWS API Gateway or Azure API Management is easier to operate.

How do I version an API without breaking changes?

Two strategies are proven in practice: URL versioning with /v1/, /v2/ for REST — simple, well-documentable, but maintenance-intensive with many versions. For GraphQL, the field-based model applies — add new fields, mark old ones as deprecated, never delete them, and remove them only after telemetry confirms they are no longer used. Important in both cases: a documented deprecation period of at least six months and a clearly communicated Sunset header.

Ready to set up your API landscape properly?

Let's talk for 30 minutes, no commitment. We assess your current interface estate, propose an appropriate protocol mix and deliver a realistic roadmap for the first 90 days — including gateway architecture, versioning strategy and documentation setup.

Schedule a 30-minute call
Hakan Akcan
Hakan Akcan · Founder & CEO Reepa Solutions

IT security and cloud architect with over ten years of experience. Develops Reepa Security and several SaaS platforms for mid-market companies with his team. Writes regularly about API design, cloud architecture, NIS2 and GDPR compliance.

Reviewed on: 22 May 2026 · More about Hakan

More from our knowledge hubs

🛡
Security
Cybersecurity
15 articles →
🧠
Artificial Intelligence
AI for Mid-Market
15 articles →
Infrastructure
Cloud & DevOps
15 articles →
💻
Development
Software Development
15 articles →