Skip to content

feat(client): enable fetch duplex mode automatically for streaming requests - #1644

Merged
dinwwwh merged 1 commit into
middleapi:mainfrom
dinwwwh:feat/client/auto-define-duplex-for-streaming-request
Jul 9, 2026
Merged

feat(client): enable fetch duplex mode automatically for streaming requests#1644
dinwwwh merged 1 commit into
middleapi:mainfrom
dinwwwh:feat/client/auto-define-duplex-for-streaming-request

Conversation

@dinwwwh

@dinwwwh dinwwwh commented Jul 8, 2026

Copy link
Copy Markdown
Member

No description provided.

@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
orpc Ready Ready Preview, Comment Jul 8, 2026 1:43pm

@pkg-pr-new

pkg-pr-new Bot commented Jul 8, 2026

Copy link
Copy Markdown
More templates

@orpc/arktype

npm i https://pkg.pr.new/@orpc/arktype@1644

@orpc/bun

npm i https://pkg.pr.new/@orpc/bun@1644

@orpc/client

npm i https://pkg.pr.new/@orpc/client@1644

@orpc/cloudflare

npm i https://pkg.pr.new/@orpc/cloudflare@1644

@orpc/contract

npm i https://pkg.pr.new/@orpc/contract@1644

@orpc/experimental-effect

npm i https://pkg.pr.new/@orpc/experimental-effect@1644

@orpc/evlog

npm i https://pkg.pr.new/@orpc/evlog@1644

@orpc/interop

npm i https://pkg.pr.new/@orpc/interop@1644

@orpc/json-schema

npm i https://pkg.pr.new/@orpc/json-schema@1644

@orpc/nest

npm i https://pkg.pr.new/@orpc/nest@1644

@orpc/next

npm i https://pkg.pr.new/@orpc/next@1644

@orpc/openapi

npm i https://pkg.pr.new/@orpc/openapi@1644

@orpc/opentelemetry

npm i https://pkg.pr.new/@orpc/opentelemetry@1644

@orpc/pino

npm i https://pkg.pr.new/@orpc/pino@1644

@orpc/publisher

npm i https://pkg.pr.new/@orpc/publisher@1644

@orpc/ratelimit

npm i https://pkg.pr.new/@orpc/ratelimit@1644

@orpc/server

npm i https://pkg.pr.new/@orpc/server@1644

@orpc/shared

npm i https://pkg.pr.new/@orpc/shared@1644

@orpc/tanstack-query

npm i https://pkg.pr.new/@orpc/tanstack-query@1644

@orpc/valibot

npm i https://pkg.pr.new/@orpc/valibot@1644

@orpc/zod

npm i https://pkg.pr.new/@orpc/zod@1644

commit: 5dc4bd9

@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes — auto-detection and conditional injection of duplex: 'half' for streaming fetch request bodies.

  • Add GET_SUPPORTED_DUPLEX_MODE detector in packages/client/src/adapters/fetch/transport.ts to probe runtime support for the RequestInit.duplex option.
  • Conditionally set init.duplex when the fetch body is a ReadableStream and the detector reports support.
  • Remove manual duplex: 'half' wrappers from integration test helpers across Bun, Hono Fetch, and Node HTTP client-server setups.
  • Add unit tests in packages/client/src/adapters/fetch/rpc-link.test.ts covering supported and unsupported runtime behavior, and mock @orpc/shared once to make detection deterministic.

Pullfrog  | View workflow run | Using Kimi K2 (free via Pullfrog for OSS) | 𝕏

@dinwwwh
dinwwwh merged commit d19bd52 into middleapi:main Jul 9, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant