Generates GraphQL schemas from gRPC Protocol Buffers and creates the server or gRPC client.
MIT License
Bot releases are hidden (Show)
Published by single9 5 months ago
Published by single9 almost 2 years ago
Published by single9 almost 2 years ago
Published by single9 about 2 years ago
Update @grpc/grpc-js to 1.6.10
Published by single9 over 2 years ago
Published by single9 over 2 years ago
Published by single9 over 2 years ago
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!
initRPCClient
to instead of new RPCClient
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: https://github.com/single9/node-grpc-graphql-server/compare/v0.6.2...v1.0.0
Published by single9 almost 3 years ago
Published by single9 about 3 years ago
Published by single9 about 3 years ago
DEBUG='grpc-gql-server:*'
to enable it.Published by single9 over 3 years ago
In v0.4.0, we have three changes:
You can install this version via npm:
npm i [email protected]
I will continue to develop this package and any feedback is welcome! :)