You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, gruf only supports hashes when sending messages - it won't allow you to actually pass in the request object itself. E.g. in client_spec.rb, this doesn't work:
We'd really like to use the request object directly because we can make use of Sorbet generated types when we do this. We also can't just call to_h on the object and pass it in, because there are bugs in this method (such as this one).
Other Notables
It seems like this would be simple enough to implement by just checking to see if the passed in params respond to the to_proto message and if so, not to call the request_object method and just use it as is.
I can have a quick PR with this up if there are no objections.
The text was updated successfully, but these errors were encountered:
What? Why?
Currently,
gruf
only supports hashes when sending messages - it won't allow you to actually pass in the request object itself. E.g. in client_spec.rb, this doesn't work:We'd really like to use the request object directly because we can make use of Sorbet generated types when we do this. We also can't just call
to_h
on the object and pass it in, because there are bugs in this method (such as this one).Other Notables
It seems like this would be simple enough to implement by just checking to see if the passed in
params
respond to theto_proto
message and if so, not to call therequest_object
method and just use it as is.I can have a quick PR with this up if there are no objections.
The text was updated successfully, but these errors were encountered: