Timo Stamm

Results 302 comments of Timo Stamm

I should have been more clear that the code snippet was really just a pseudo-code example to illustrate that users don't have to hand-write requests paths and serialization code -...

@nguyenyou, the [Connect protocol](https://connectrpc.com/docs/protocol) is very simple, especially for unary and JSON. This should mock the [rpc Say](https://github.com/connectrpc/connect-es/blob/dbde9a0f33ea903577c494559e63942a9e8146c1/packages/example/eliza.proto#L27) of the demo service Eliza: ```ts import { http, HttpResponse } from...

@martines3000, yes, the PR will make this much easier and less error-prone. We'll pick it up again soon. You're using `createConnectTransport` from `@connectrpc/connect-node`, which is using the Node.js built-in modules...

Hey @Dartoxian, I just modified the [example](https://github.com/connectrpc/connect-es/tree/main/packages/example) slightly: ```diff diff --git a/packages/example/src/server.ts b/packages/example/src/server.ts index ada61ca..9aacea1 100644 --- a/packages/example/src/server.ts +++ b/packages/example/src/server.ts @@ -35,14 +35,12 @@ function routes(router: ConnectRouter) { }, async...

Hey Sasha, we do not export all types to keep the API surface manageable. It would be very difficult to make any non-breaking changes otherwise. Can you get by with...

For example, here is how you could extract a specific signature: ```ts import type {MethodInfo, PartialMessage,} from "@bufbuild/protobuf"; import {Int32Value, MethodKind, StringValue} from "@bufbuild/protobuf"; import type {HandlerContext, MethodImpl} from "@connectrpc/connect";...

Ah, so the IDE is scaffolding an implementation with `UnaryImpl` for you? I agree that's not ideal and it sounds like we should improve it if possible. Can you provide...

Thanks for the context, @sachaw. The recommended implementation using classes would be: ```ts class Model implements ServiceImpl { addServer(request: AddServerRequest) { // do something with the request... return new AddServerResponse();...

I think we should be able to get a IDE suggestion matching our recommendation by "unrolling" the types for service methods: https://github.com/connectrpc/connect-es/blob/83dbda37f44b4b2c3dbc91437c21c39eafa6d332/packages/connect/src/implementation.ts#L44-L45 Similar to how we do it for client...

enum, enum fields, messages, message fields, and files can also have options, but I'd agree that service and rpc are some of the most interesting ones. We've punted on this...