GitShow/trpc/trpc
trpc

trpc

๐Ÿง™โ€โ™€๏ธ Move Fast and Break Nothing. End-to-end typesafe APIs made easy.

by trpc
apinextnextjsprismareacttypescript
Star on GitHubForkWebsitenpm

TypeScript

40.6k stars1.7k forks521 contributorsActive ยท 2d agoSince 2020v11.18.0MIT

Meet the team

See all 521 on GitHub โ†’
KATT
KATT2.0k contributions
dependabot[bot]Bot
dependabot[bot]760 contributions
renovate[bot]Bot
renovate[bot]569 contributions
juliusmarminge
juliusmarminge264 contributions
allcontributors[bot]Bot
allcontributors[bot]140 contributions
Nick-Lucas
Nick-Lucas64 contributions
ixahmedxi
ixahmedxi48 contributions
sachinraja
sachinraja34 contributions

Languages

View on GitHub โ†’
TypeScript84.3%
MDX14.2%
JavaScript0.8%
CSS0.7%

Commit activity

Last 12 weeks ยท 9 commits

Full graph โ†’

Community health

4 of 6 standards met

Community profile โ†’
87
โœ“READMEโœ“Licenseโœ“Contributingโ—‹Code of Conductโ—‹Issue Templateโœ“PR Template

Recent PRs & issues

Active ยท Last activity 2d ago
See all on GitHub โ†’
Larslllllll
fix(client): own AbortController in httpLink and httpBatchLink (#7468)OpenPR

Bug and both pass directly to the underlying request without creating an internal , and their observable cleanup functions are . This means when a subscriber unsubscribes, the in-flight fetch request is not cancelled โ€” the same class of bug that was fixed in by PR #7390. Every other link in the package (, , ) already owns its own and calls in the observable cleanup. Fix httpLink โ€” create an , pass to the requester, call in cleanup. httpBatchLink โ€” create an , combine it with via so the batch request is aborted when the individual observable unsubscribes, call in cleanup. Pattern matches the existing correct implementations in and . Closes #7468 Summary by CodeRabbit Bug Fixes** Improved cancellation of in-flight HTTP requests when an operation is unsubscribed. Added reliable cancellation for batched HTTP loads during teardown. Ensured request cancellation signals correctly combine operation and subscription lifecycle events.

Larslllllll ยท 3h ago
Larslllllll
fix(server): correct inverted condition in assertIsRequestId (#7450)OpenPR

Bug in had an inverted condition that only threw for , silently accepting booleans, arrays, and objects as valid request IDs. The broken condition: Since is always true when is evaluated, this simplifies to โ€” it only throws for . Fix This correctly throws when is not , not a , and not a non-NaN . Closes #7450 Summary by CodeRabbit Refactor** Simplified internal request ID validation while preserving existing behavior.

Larslllllll ยท 3h ago
oyi77
fix: remove duplicate words in code commentsOpenPR

Summary Removes duplicate words in 2 files: โ€” "the the" โ†’ "the" โ€” "is is" โ†’ "is" Comment-only changes, no functional impact. Summary by CodeRabbit Style** Corrected a typo in a code comment for improved clarity.

oyi77 ยท 2d ago

Recent fixes

View closed PRs โ†’
raine-works
fix(server): preserve `this` when chaining to a pre-existing dispose methodMergedPR

Problem / in capture a pre-existing native / method off the wrapped object and later invoke it detached from its receiver: On runtimes that natively implement the TC39 Explicit Resource Management proposal on generators/async generators โ€” Bun (JSC) and Node 24+/25 (V8) โ€” the native / method relies on internally. Calling it detached throws: Bun: at Node 24+/25: This surfaces in practice whenever a tRPC subscription implemented as an async generator (e.g. one built with over ) is torn down โ€” for example on client disconnect/logout โ€” since the subscription handler's async generator already has a native , and wraps it to also abort the underlying stream. Confirmed via that this is still present in the latest published version. Fix Call the existing method bound to instead of detached: This preserves the original receiver so the native implementation can use as it expects, while still chaining to the outer cleanup. Testing Added with 3 regression tests: preserves when chaining to a pre-existing preserves when chaining to a pre-existing disposal does not throw for a real async generator with a native , and its block still runs Verified the tests fail (reproducing the exact reported error) with the fix reverted, and pass with it applied. Summary by CodeRabbit Bug Fixes Improved cleanup of synchronous and asynchronous resources by preserving the resource context during disposal. Ensured asynchronous generator cleanup completes reliably without errors. Tests Added coverage for disposal chaining and generator cleanup behavior.

raine-works ยท 1d ago
Structured data for AI agents

Repository: trpc/trpc. Description: ๐Ÿง™โ€โ™€๏ธ Move Fast and Break Nothing. End-to-end typesafe APIs made easy. Stars: 40582, Forks: 1660. Primary language: TypeScript. Languages: TypeScript (84.3%), MDX (14.2%), JavaScript (0.8%), CSS (0.7%). License: MIT. Homepage: https://tRPC.io Topics: api, next, nextjs, prisma, react, typescript. Latest release: v11.18.0 (2mo ago). Open PRs: 100, open issues: 176. Last activity: 2d ago. Community health: 87%. Top contributors: KATT, dependabot[bot], renovate[bot], juliusmarminge, allcontributors[bot], Nick-Lucas, ixahmedxi, sachinraja, kamilogorek, github-actions[bot] and others.

ยท@ofershap

Replace github.com with gitshow.dev