npm / @connectrpc/connect
@connectrpc/connect
What changed in @connectrpc/connect 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-19.
15 breaking2 new APIs and options1 behavior and defaults1 tooling1 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@connectrpc/connect 220 changes
Breaking changes 15
Bare errors are no longer serialized to the wire.
Headers and trailers are reached through a
CallInfovia context APIs.Metadata moves to context; headers and trailers are reached through a
CallInfovia this API.A function type replaces the three-method
Interceptorinterface and works for unary and streaming RPCs.Metadata moves to context; headers and trailers are reached through a
CallInfovia this API.Servers register with
connect.NewServerand are mounted withconnecthttp.Mount.The wrapper is gone; unary handlers and clients use plain Protobuf messages.
The wrapper is gone; unary handlers and clients use plain Protobuf messages.
A function type replaces the three-method
Interceptorinterface and works for unary and streaming RPCs.Servers are mounted with
connecthttp.Mount.Creates the transport that clients wrap.
The three-method interface is replaced by client and server interceptor function types.
Generated code no longer depends on
net/http.The generator's
simpleflag has been removed.Simple signatures are now the default: unary handlers and clients use plain Protobuf messages.
New APIs and options 2
Clients wrap a
connect.Transportcreated byconnecthttp.NewTransport.An in-process transport enables testing without listeners or loopback HTTP.
Behavior and default changes 1
Errors received from clients are marked remote.
Tooling 1
The migration tool automatically applies many mechanical changes; without
-w, it runs a dry run and prints diffs.
Fixes and other changes 1
connect.NewErrortakes a message string.