Skip to content

Allow ConvexHttpClient in withArgs #576

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

Merged
merged 1 commit into from
May 13, 2025
Merged

Conversation

thomasballinger
Copy link
Contributor

@thomasballinger thomasballinger commented May 12, 2025

As a future direction how about withArgs can return more full wrappers of various clients? If that works as a plan then it's fine to add more clients here and a type parameter for the client type in the future, but for now it's just the same interface!

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@thomasballinger thomasballinger merged commit ca6d364 into main May 13, 2025
4 of 5 checks passed
@ianmacartney
Copy link
Collaborator

If you mean having them implement more of the interface, yes sgtm - I was wondering if this is the right spot for a proxy object approach.

If what you mean by full client is that this does the initialization too, then I'm not sure.
For stateful clients, I suspect there will be a lot of hybrid calls with and without extra params. And I suspect this one could be nested too to have e.g. one that supplies an apiKey argument, and another elsewhere that adds a userId argument?

@thomasballinger
Copy link
Contributor Author

Proxy or manually passing through the supported methods/properties sounds good, makes sense that these should be lightweight wrappers so you can create many.

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.

3 participants