Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use another proto-loader for grpc #1269

Closed
grin0c opened this issue Nov 7, 2018 · 2 comments
Closed

Use another proto-loader for grpc #1269

grin0c opened this issue Nov 7, 2018 · 2 comments

Comments

@grin0c
Copy link
Contributor

grin0c commented Nov 7, 2018

I'm submitting a...


[ ] Regression 
[ ] Bug report
[x] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

Cannot use another proto-loader instead of @grpc/proto-loader

Expected behavior

You will be able to use another proto-loader

Some of the major changes:

export class ServerGrpc extends Server implements CustomTransportStrategy {
  private readonly url: string;
  private grpcClient: any;

  constructor(private readonly options: MicroserviceOptions['options']) {
    super();
    this.url =
      this.getOptionsProp<GrpcOptions>(options, 'url') || GRPC_DEFAULT_URL;

    const protoLoader =
      this.getOptionsProp<GrpcOptions>(options, 'protoLoader') || GRPC_DEFAULT_PROTO_LOADER;

    grpcPackage = this.loadPackage('grpc', ServerGrpc.name);
    grpcProtoLoaderPackage = this.loadPackage(
      protoLoader,
      ServerGrpc.name,
    );
  }

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

I want to use grpc without protocol buffers and I want to use another serialization/deserialization

Environment


Nest version: 5.4.0

 
For Tooling issues:
- Node version: 8.12.0  
- Platform: Mac  

Others:

@kamilmysliwiec
Copy link
Member

5.5.0 has just been published :)

@lock
Copy link

lock bot commented Sep 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants