Releases: single9/node-grpc-graphql-server
Releases · single9/node-grpc-graphql-server
v1.2.0
What's Changed in v1.2.0
- chore(): bumped to version 1.2.0 by @single9
- chore: add cliff by @single9
- ci: update github action by @single9
- ci: update github action by @single9
- chore: update packages and fix deprecated code by @single9
- chore(deps): bump @babel/traverse from 7.18.9 to 7.24.1 by @single9 in #13
- chore(deps): bump @babel/traverse from 7.18.9 to 7.24.1 by @dependabot[bot]
- chore(deps): bump protobufjs from 7.2.4 to 7.2.6 by @single9 in #12
- chore(deps): bump protobufjs from 7.2.4 to 7.2.6 by @dependabot[bot]
v1.1.6
v1.1.5
v1.1.4
v1.1.3
v1.1.2
v1.1.0
v1.0.0
Hi guys,
In this version, the major change is all source code is move from native JavaScript to TypeScript. Now, you can see more details in your IDE which have code intelligence.
BTW, I also use yarn instead of npm!
Changes:
- Move to TypeScript
- Add
initRPCClient
to instead ofnew RPCClient
- Add tests
- Fix bugs
- Improve types
Migration
The RPCClient
is no longer return the gRPC clitents after created. This is because of limitation of TypeScript[1]. So I add another function, initRPCClient
, to create clients.
Just replace new RPCClient
with initRPCClient
and your program will work like before.
const { RPCClient } = require("grpc-graphql-server");
- const rpcClient = new RPCClient({
+ const rpcClient = initRPCClient({
// protoFile: __dirname + '/protos', // Set this if your protobuf file doesn't located in the default directory.
packages: [
{
name: "helloworld",
services: [
{
name: "Greeter",
// port: 50052, // Uncomment this to set gRPC client port to 50052
},
],
},
],
});
[1]: Return type of constructor signature must be assignable to the instance type of the class.ts(2409)
Full Changelog: v0.6.2...v1.0.0