Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2: Remove CallOptions #436

Merged
merged 2 commits into from
Oct 3, 2024
Merged

V2: Remove CallOptions #436

merged 2 commits into from
Oct 3, 2024

Conversation

timostamm
Copy link
Member

Hooks and several other functions accept CallOptions from @connectrpc/connect. In general, every Connect client should accept a call options argument, but they don't work well with TanStack Query's caching.

For now, we're removing CallOptions from the function arguments in v2.

Signed-off-by: Timo Stamm <ts@timostamm.de>
export async function callUnaryMethod<
I extends DescMessage,
O extends DescMessage,
>(
transport: Transport,
Copy link
Member Author

Choose a reason for hiding this comment

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

Removing CallOptions is a breaking change, but we're also changing the function signature here. Transport is strictly necessary to make a call, so I think it's a better fit to let it be a required argument than part of an options argument.

README.md Outdated Show resolved Hide resolved
Signed-off-by: Timo Stamm <ts@timostamm.de>
@timostamm timostamm merged commit 6b54e70 into v2 Oct 3, 2024
6 checks passed
@timostamm timostamm deleted the tstamm/v2/Remove-CallOptions branch October 3, 2024 14:01
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