A lightweight, non-opinionated proxy that wraps @grpc/grpc-js server and client implementations with RxJS Observables. Version 0.2.31 is the current stable release, with low release cadence. Unlike the original rxjs-grpc, this package has no CLI and does not impose build tools, allowing you to use @grpc/proto-loader directly. It supports unary, server-streaming, client-streaming, and bidirectional calls via Observables, and provides built-in cancellation via grpcCancel(). Replaces the deprecated grpc package with @grpc/grpc-js. Requires RxJS 7.x and Node.js >= 20.
npm install rxjs-grpc-minimalNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates loading a proto file, creating an RxJS client for unary calls, and setting up an RxJS server with async implementations.
Use ES module import syntax ('import { toRxClient } from 'rxjs-grpc-minimal'') and ensure your project is configured for ESM (e.g., 'type': 'module' in package.json).Replace 'grpc' dependency with '@grpc/grpc-js' and use its loadPackageDefinition API.
Always use Rx.Subject or another Observable from RxJS for client stream calls.
Always append 'Rx' to the protobuf method name when calling on the client. For server implementations, do NOT use the 'Rx' suffix.
Install '@grpc/proto-loader' and use protoLoader.loadSync() to load .proto files directly.
Upgrade to Node.js >=20.
Call stream$.grpcCancel() before unsubscribing, or use takeUntil() with a cancellation subject to properly clean up.
Change to greeter.sayHelloRx({ name: 'World' }).forEach(...).Use import syntax: import { toRxClient } from 'rxjs-grpc-minimal'. Set 'type': 'module' in package.json or use .mjs extension.Ensure you call toRxClient(grpcAPI.helloworld) where 'helloworld' is your proto package name, and that the proto is loaded correctly via '@grpc/proto-loader'.
npm uninstall grpc && npm install @grpc/grpc-js
Use new Subject() as the argument to the Rx method: const writer = new Subject(); greeter.streamSayHelloRx(writer).