feat(contract)!: replace contract caller with contract client factory#1699
Merged
dinwwwh merged 1 commit intoJul 21, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
More templates
@orpc/arktype
@orpc/bun
@orpc/client
@orpc/cloudflare
@orpc/contract
@orpc/experimental-effect
@orpc/evlog
@orpc/json-schema
@orpc/nest
@orpc/next
@orpc/openapi
@orpc/opentelemetry
@orpc/pinia-colada
@orpc/pino
@orpc/publisher
@orpc/ratelimit
@orpc/server
@orpc/shared
@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
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — replaced the single-procedure contract caller with a contract client factory that accepts router/sub-router contracts, threading base-path resolution through TanStack Query utils and the OpenAPI jsonified wrapper.
- Renamed contract entry points —
createContractCaller→createContractClientFactoryin@orpc/contractandcreateContractJsonifiedCaller→createContractJsonifiedClientFactoryin@orpc/openapi. - Router-contract support — factories now accept a
RouterContract, return aRouterContractClient, and resolve procedure paths asbasePath + shape. - New helper — exported
resolveBasePathMetaderives the base path from the first procedure contract that definesmeta.path. - TanStack Query alignment —
createContractUtilsFactoryandcreateContractJsonifiedUtilsFactorynow take aContractClientFactory, accept router contracts, and derive the query-keypathfrom the contract (thepathoption is no longer exposed on factory options). - Docs & cleanup — updated
apps/content/docs/advanced/scaling-large-projects.mdand removed the stale**/.claude/**exclusion fromvitest.config.ts.
Kimi K2 (free via Pullfrog for OSS) | 𝕏
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.

createContractCalleris nowcreateContractClientFactory: instead of calling a procedure directly, it returns a client for the passed contract — and it accepts router contracts too. Same forcreateContractJsonifiedCaller→createContractJsonifiedClientFactoryin@orpc/openapi.meta.path) + the router shape, so sub-routers of the root contract workcontractRefregisters every procedure inside the passed contract at its resolved pathcreateContractUtilsFactory/createContractJsonifiedUtilsFactoryin@orpc/tanstack-queryaccept router contracts the same wayresolveBasePathMetahelper exported from@orpc/contract