Skip to content

Add Optional Metadata Parameter to Service Interface #11

@ksaldana1

Description

@ksaldana1

Currently, the generated service interface methods accept a single parameter as an argument.
Example:
getPage(request: logbook.getPageRequest): Observable<logbook.Page>;

gRPC allows you to pass optional parameters to service calls in the form of metadata. This information is passed through correctly at the moment due to ...args spread, however the type signature causes the compiler to complain. I could just add things such as the JWT token to the request proto definition itself, but metadata feels like the appropriate use case.

Do you think it would be appropriate for the interface service definitions to include metadata as an optional parameter?
getPage(request: logbook.getPageRequest, metadata?: any): Observable<logbook.Page>;

I can try to get a PR together if you'd like.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions