adapter-fetch

Deploy tRPC services to edge runtimes using fetchRequestHandler.

2|Updated Apr 11, 2026
One-click install
npx skills add https://github.com/PlazaCC/antes-da-tela --skill adapter-fetch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: adapter-fetch
Source: https://github.com/PlazaCC/antes-da-tela/tree/main/.agents/skills/adapter-fetch
Command: npx skills add https://github.com/PlazaCC/antes-da-tela --skill adapter-fetch

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Deploying tRPC APIs to modern edge runtimes is cumbersome because traditional Node.js adapters are not compatible, leading to mismatched endpoints and missing context handling.

Core Features & Use Cases

  • Universal Edge Adapter: Works with Cloudflare Workers, Deno Deploy, Vercel Edge, Astro, Remix, and SolidStart via fetchRequestHandler.
  • Custom Context Creation: Provides req and resHeaders through FetchCreateContextFnOptions for authentication or response header manipulation.
  • Batch Size Control: Supports maxBatchSize to limit request batching and improve reliability.
  • Common Pitfall Guidance: Highlights endpoint mismatches and correct configuration examples.

Quick Start

Use the adapter-fetch skill to create a Cloudflare Worker that serves a tRPC router at “/trpc” with custom request‑based context.

Frequently Asked Questions about adapter-fetch

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy tRPC to Cloudflare Workers?

To deploy tRPC to Cloudflare Workers, use the fetchRequestHandler adapter to route API requests through a fetch-compatible environment, bypassing incompatible Node.js adapters.

Can I use tRPC with Deno Deploy and Vercel Edge?

Yes, tRPC works with Deno Deploy and Vercel Edge. The universal edge adapter uses fetchRequestHandler to deploy tRPC services across multiple modern edge runtimes.

How do I create custom context for tRPC edge requests?

Create custom context for tRPC edge requests using FetchCreateContextFnOptions, which provides req and resHeaders for authentication and response header manipulation.

How do I limit tRPC request batching on edge runtimes?

Limit tRPC request batching on edge runtimes by configuring the optional maxBatchSize parameter within fetchRequestHandler, controlling batch sizes to improve API reliability.

Why are my tRPC endpoints missing on edge runtimes?

Missing tRPC endpoints on edge runtimes usually stem from endpoint mismatches or using traditional Node.js adapters. Ensure you use fetchRequestHandler and correct configuration examples.