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

Add a ConnectRouter based Transport #548

Merged
merged 4 commits into from
Mar 30, 2023
Merged

Add a ConnectRouter based Transport #548

merged 4 commits into from
Mar 30, 2023

Conversation

srikrsna-buf
Copy link
Member

@srikrsna-buf srikrsna-buf commented Mar 28, 2023

Add a UniversalHandler based http client. Also add createRouterTransport.

This can be used to create mock/stub handlers for testing client and also to test backends without needed to run a server.

Copy link
Member

@timostamm timostamm left a comment

Choose a reason for hiding this comment

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

Some test coverage would be nice. Also see comments below:

packages/connect/src/router-http-client.ts Outdated Show resolved Hide resolved
packages/connect/src/router-http-client.ts Outdated Show resolved Hide resolved
packages/connect/src/router-http-client.ts Outdated Show resolved Hide resolved
@srikrsna-buf srikrsna-buf changed the title Add a ConnectRouter based http client Add a ConnectRouter based Transport Mar 30, 2023
packages/connect/src/routes-transport.spec.ts Outdated Show resolved Hide resolved
packages/connect/src/routes-transport.spec.ts Outdated Show resolved Hide resolved
packages/connect/src/index.ts Outdated Show resolved Hide resolved
packages/connect/src/routes-transport.ts Outdated Show resolved Hide resolved
packages/connect/src/protocol/universal-handler-client.ts Outdated Show resolved Hide resolved
Copy link
Member

@timostamm timostamm left a comment

Choose a reason for hiding this comment

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

Nice!

Copy link
Contributor

@dimitropoulos dimitropoulos left a comment

Choose a reason for hiding this comment

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

really ran this code through its paces with https://github.com/bufbuild/connect-query/commits/dimitri/mock-transport and it's working amazingly!

@srikrsna-buf srikrsna-buf merged commit fff12d8 into main Mar 30, 2023
@srikrsna-buf srikrsna-buf deleted the router-transport branch March 30, 2023 20:18
@smaye81 smaye81 mentioned this pull request Apr 4, 2023
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.

None yet

3 participants