grpc handler error: "8 RESOURCE_EXHAUSTED: Received message larger than max (6771289 vs. 4194304)"
Issue workflow progress
Progress of the issue based on the Contributor Workflow
- [ ] 1. The issue provides a reproduction available on Github, Stackblitz or CodeSandbox
Make sure to fork this template and run
yarn generatein the terminal.Please make sure Mesh package versions under
package.jsonmatches yours.
- [ ] 2. A failing test has been provided
- [ ] 3. A local solution has been provided
- [ ] 4. A pull request is pending review
Describe the bug
When using grpahql-mesh with the grpc handler when making a request if the grpc response is greater than the default max size there will be an error thrown : "8 RESOURCE_EXHAUSTED: Received message larger than max (6771289 vs. 4194304)".
This is caused by the grpc client default max_receive_message_length : 4194304 : https://github.com/grpc/grpc-node/issues/1093.
The only fix for this issue would be to pass a "grpc.max_receive_message_length" config option to the grpc client but grpahql-mesh doesn't support this.
To Reproduce Steps to reproduce the behavior: To reproduce make a request where the response size is greater than 4194304
Expected behavior
A way to pass config options to the grpc client
sources:
- name: MyGRPCService
handler:
grpc:
endpoint: 'localhost:50051'
options:
'grpc.max_receive_message_length': 10000000
Or a way to pass a custom client to the handler
sources:
- name: MyGRPCService
handler:
grpc:
client: ./custom-grpc-client.js
Environment:
- OS:
-
@graphql-mesh/...: - NodeJS:
Additional context
Thanks for creating the issue! PRs are welcome if anyone is interested in implementing this missing option!
Any updates?
Looking for this feature !