gRPC reflection doesn't work for one endpoint handling multiple services
mr-nagashima opened this issue Β· comments
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 generate
in the terminal.Please make sure Mesh package versions under
package.json
matches 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
The backend's gRPC API provides nine services.
I wrote the .meshrc.yaml below.
.meshrc.yaml
sources:
- name: Backend
handler:
grpc:
endpoint: backend:3000
And when I started GraphQL Mesh in dev mode, I got an error at the end.
$ mesh dev
:
Mesh - Server π‘ Starting GraphQL Mesh...
Mesh - Server π‘ Serving GraphQL Mesh: http://0.0.0.0:4000
Mesh - Backend π Getting stored root and decoded descriptor set objects
Mesh - Backend π Building Roots
Mesh - Backend π Using the reflection
Mesh - Backend π Creating gRPC Reflection Client
Mesh - Backend π Resolving root of Service: greet.v1.GreetService from the reflection response
Mesh - Backend π Resolving root of Service: cancellation.v1.CancellationService from the reflection response
Mesh - Backend π Resolving root of Service: supplier.v1.SupplierService from the reflection response
Mesh - Backend π Resolving root of Service: depot.v1.DepotService from the reflection response
Mesh - Backend π Resolving root of Service: warehouse.v1.WarehouseService from the reflection response
Mesh - Backend π Resolving root of Service: office.v1.OfficeService from the reflection response
Mesh - Backend π Resolving root of Service: company.v1.CompanyService from the reflection response
Mesh - Backend π Resolving root of Service: plan.v1.PlanService from the reflection response
Mesh - Backend π Resolving root of Service: room.v1.RoomService from the reflection response
:
Mesh - Backend π Building the schema structure based on the root object
Mesh - Backend - Root0 π Visiting .nested[greet]
:
Mesh - Backend π Building the schema structure based on the root object
Mesh - Backend - Root8 π Visiting .nested[google]
:
Mesh - Backend π Building the final GraphQL Schema
Mesh - Backend - Root8 π Creating service client for package definition
Mesh - Backend π₯ Failed to generate the schema for the source "Backend"
Invalid value used as weak map key
Mesh HTTP π₯ Error: Schemas couldn't be generated successfully. Check for the logs by running Mesh.
at getMesh (/app/node_modules/@graphql-mesh/runtime/cjs/get-mesh.js:124:15)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
I think that the reflection has been loaded, the above error occurs at the very end.
What does "Invalid value used as weak map key" indicate?
I would appreciate it if you could tell me the solution.
To Reproduce Steps to reproduce the behavior:
Expected behavior
Start normally
Environment:
- OS: macOS 14.4.1
@graphql-mesh/...
:- NodeJS: 20
Additional context