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

gRPC reflection doesn't work for one endpoint handling multiple services #6847

Open
1 of 4 tasks
mr-nagashima opened this issue Apr 15, 2024 · 0 comments
Open
1 of 4 tasks

Comments

@mr-nagashima
Copy link

Issue workflow progress

Progress of the issue based on the
Contributor Workflow

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant