Skip to content

docs(client): add BatchLinkPlugin cookie limitations section - #2177

Merged
dinwwwh merged 3 commits into
mainfrom
claude/amazing-brahmagupta-qgk9e4
Oct 4, 2026
Merged

dinwwwh merged 3 commits into
mainfrom
claude/amazing-brahmagupta-qgk9e4

Conversation

@dinwwwh

@dinwwwh dinwwwh commented Oct 4, 2026

Copy link
Copy Markdown
Member

Summary

Added documentation about cookie handling limitations in the BatchLinkPlugin to help users understand why cookies set in batched calls are not stored and how to work around this limitation.

Changes

  • Added a new "Limitations" section to the batch plugin documentation explaining that cookies set in batched calls are never stored because browsers only read headers from the batch response itself, not from individual subresponses
  • Included a practical code example showing how to filter out cookie-setting procedures (like auth) from batching using the filter option to ensure they are sent outside the batch

Details

This documentation clarifies an important browser behavior that can catch users off guard: when using HTTP batching, individual Set-Cookie headers in subresponses are ignored by the browser. The example demonstrates the recommended pattern of excluding cookie-setting procedures from the batch using the filter condition.

https://claude.ai/code/session_01XkEanjSa3haDdSP3pJehSQ

claude added 3 commits October 4, 2026 08:06
Response headers set by procedures in a batch go into each subresponse,
which travels inside the batch response body, so the browser never applies
Set-Cookie from them. Document the limitation on the Batch Plugin page and
show how to send cookie-setting procedures outside the batch with `filter`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XkEanjSa3haDdSP3pJehSQ
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
orpc 24eef91 Commit Preview URL

Branch Preview URL
Oct 04 2026, 08:13 AM

@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

  • New Limitations section — adds ## Limitations to apps/content/docs/plugins/batch.mdx, documenting that Set-Cookie from batched subresponses is never stored by the browser, with a filter example that excludes auth procedures from batching.
  • Technical accuracy — verified against packages/server/src/plugins/batch.ts (subresponse headers travel in the peer-encoded body; the real batch response defaults to status 207 and headers: {}) and packages/client/src/plugins/batch.ts (filter: false sends the request individually via interceptorOptions.next()). The claim and workaround are correct.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@pkg-pr-new

pkg-pr-new Bot commented Oct 4, 2026

Copy link
Copy Markdown
More templates

@orpc/ai-sdk

npm i https://pkg.pr.new/@orpc/ai-sdk@2177

@orpc/arktype

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

@orpc/bun

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

@orpc/client

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

@orpc/cloudflare

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

@orpc/contract

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

@orpc/experimental-effect

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

@orpc/evlog

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

@orpc/hibernation

npm i https://pkg.pr.new/@orpc/hibernation@2177

@orpc/json-schema

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

@orpc/experimental-lock

npm i https://pkg.pr.new/@orpc/experimental-lock@2177

@orpc/experimental-msw

npm i https://pkg.pr.new/@orpc/experimental-msw@2177

@orpc/nest

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

@orpc/next

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

@orpc/node

npm i https://pkg.pr.new/@orpc/node@2177

@orpc/openapi

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

@orpc/opentelemetry

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

@orpc/pinia-colada

npm i https://pkg.pr.new/@orpc/pinia-colada@2177

@orpc/pino

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

@orpc/publisher

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

@orpc/ratelimit

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

@orpc/server

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

@orpc/shared

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

@orpc/swr

npm i https://pkg.pr.new/@orpc/swr@2177

@orpc/tanstack-query

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

@orpc/trpc

npm i https://pkg.pr.new/@orpc/trpc@2177

@orpc/valibot

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

@orpc/zod

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

commit: 24eef91

@codecov

codecov Bot commented Oct 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@dinwwwh dinwwwh changed the title docs(rpc): add BatchLinkPlugin cookie limitations section docs(client): add BatchLinkPlugin cookie limitations section Oct 4, 2026
@dinwwwh
dinwwwh merged commit 554e759 into main Oct 4, 2026
11 checks passed
@codspeed

codspeed Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will improve performance by 11.78%

⚡ 1 improved benchmark
✅ 29 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
⚡ serve deeply nested encoded path 1.2 ms 1 ms +11.78%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing claude/amazing-brahmagupta-qgk9e4 (24eef91) with main (161cdc0)

Open in CodSpeed

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.

2 participants