---
title: "Discussion on \"How to incrementally adopt Edge functions with multiple TRPC backends\" | Hashnode"
description: "Discussion on \"How to incrementally adopt Edge functions with multiple TRPC backends\". TRPC on Next.js Vercel Edge Functions"
url: "https://hashnode.com/posts/how-to-incrementally-adopt-edge-functions-with-multiple-trpc-backends/659c82dc33d6bbb80225f5ba"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to incrementally adopt Edge functions with multiple TRPC backends](https://stewartcodes.hashnode.dev/how-to-incrementally-adopt-edge-functions-with-multiple-trpc-backends?utm_source=hashnode&utm_medium=feed)

TRPC on Next.js Vercel Edge Functions

Jan 8, 2024 · 3 min read · stewartcodes.hashnode.dev  
Read the article

-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#edge-functions](https://hashnode.com/tag/edge-functions)
-   [#edgecomputing](https://hashnode.com/tag/edgecomputing)
-   [#trpc](https://hashnode.com/tag/trpc)
-   [#planetscale](https://hashnode.com/tag/planetscale)
-   [#vercel](https://hashnode.com/tag/vercel)
-   [#nextjs](https://hashnode.com/tag/nextjs)

## Written by

[Stewart Bracken](https://hashnode.com/@stewartcodes)

@stewartcodes

  
[View profile](https://hashnode.com/@stewartcodes)

stewart codes

## Responses 1

Markdown supported · ⌘↵ to post

[Hifumi Takai](https://hashnode.com/@thanai)

[Jun 12, 2025](https://hashnode.com/posts/how-to-incrementally-adopt-edge-functions-with-multiple-trpc-backends/659c82dc33d6bbb80225f5ba/comment/684b0c81f5ae9a7e88dceada)

Thank you so much for sharing this brilliant solution! I was struggling to get React Query integration working with tRPC edge runtime, and your dynamic routing approach with custom links solved it perfectly.

The idea of using a custom link function to route api.edge.\* calls to the edge runtime while keeping api.\* calls on the regular Node.js runtime is genius. This gives us the best of both worlds - edge runtime performance with full tRPC React Query integration and type safety.

I implemented this in my Next.js project and it works flawlessly. Now I can use api.edge.\*.useQuery() with all the React Query features while actually running in edge runtime. The dynamic routing is so elegant!

Your blog post saved me hours of work. Thank you for taking the time to document and share this solution! 🙏
