docs(client): add BatchLinkPlugin cookie limitations section - #2177
Merged
Merged
Conversation
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
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XkEanjSa3haDdSP3pJehSQ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XkEanjSa3haDdSP3pJehSQ
Deploying with
|
| 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 |
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- New Limitations section — adds
## Limitationstoapps/content/docs/plugins/batch.mdx, documenting thatSet-Cookiefrom batched subresponses is never stored by the browser, with afilterexample that excludesauthprocedures 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 status207andheaders: {}) andpackages/client/src/plugins/batch.ts(filter: falsesends the request individually viainterceptorOptions.next()). The claim and workaround are correct.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
More templates
@orpc/ai-sdk
@orpc/arktype
@orpc/bun
@orpc/client
@orpc/cloudflare
@orpc/contract
@orpc/experimental-effect
@orpc/evlog
@orpc/hibernation
@orpc/json-schema
@orpc/experimental-lock
@orpc/experimental-msw
@orpc/nest
@orpc/next
@orpc/node
@orpc/openapi
@orpc/opentelemetry
@orpc/pinia-colada
@orpc/pino
@orpc/publisher
@orpc/ratelimit
@orpc/server
@orpc/shared
@orpc/swr
@orpc/tanstack-query
@orpc/trpc
@orpc/valibot
@orpc/zod
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
Merging this PR will improve performance by 11.78%
Performance Changes
Tip Curious why performance improved? Comment Comparing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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
filteroption to ensure they are sent outside the batchDetails
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