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

[V1] Object at path ... is not a service constructor when a rename transform provided #8221

Closed
2 of 4 tasks
iamchanii opened this issue Jan 3, 2025 · 3 comments · Fixed by #8226
Closed
2 of 4 tasks

Comments

@iamchanii
Copy link
Contributor

iamchanii commented Jan 3, 2025

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

In the grpc-multiple e2e example, trying to add a new rename transform (e.g. pets_PetService_GetAllPetsGetAllPets) and executing the query operation will fail with the message Object at path ... is not a service constructor.

[2025-01-03T14:34:03.183Z] ERROR  Error: Object at path petstore.PetStoreService is not a Service constructor
    at DisposableStack.getServiceClient (file://packages/transports/grpc/dist/esm/index.js:68:23)
    at DisposableStack.processDirectives (file://packages/transports/grpc/dist/esm/index.js:167:53)
    at file://packages/transports/grpc/dist/esm/index.js:211:23
    at mapMaybePromise (file://node_modules/@graphql-tools/utils/esm/map-maybe-promise.js:22:12)
    at getSubgraphExecutor (file://packages/transports/grpc/dist/esm/index.js:210:16)
    at file://node_modules/@graphql-mesh/fusion-runtime/dist/index.js:75:14 {
  path: [ 'GetAllPets' ],
  locations: [ { line: 3, column: 9 } ],
  extensions: [Object: null prototype] {}
}
[2025-01-03T14:34:03.191Z] ERROR  Error: Object at path pets.PetService is not a Service constructor
    at DisposableStack.getServiceClient (file://packages/transports/grpc/dist/esm/index.js:68:23)
    at DisposableStack.processDirectives (file://packages/transports/grpc/dist/esm/index.js:167:53)
    at file://packages/transports/grpc/dist/esm/index.js:211:23
    at mapMaybePromise (file://node_modules/@graphql-tools/utils/esm/map-maybe-promise.js:22:12)
    at getSubgraphExecutor (file://packages/transports/grpc/dist/esm/index.js:210:16)
    at file://node_modules/@graphql-mesh/fusion-runtime/dist/index.js:75:14 {
  path: [ 'GetAllPetStores' ],
  locations: [ { line: 3, column: 9 } ],
  extensions: [Object: null prototype] {}
}

To Reproduce Steps to reproduce the behavior:

Check out the branch and commit to issue replication and follow the instructions below:

  • $ yarn install and $ yarn build
  • Run grpc-multiple e2e tests via $ JEST=1 E2E_TEST=true yarn jest grpc-multiple

Expected behavior

Expect to run successfully

Environment:

  • OS: MacOS Sonoma 14.5
  • @omnigraph/grpc: 0.2.0
  • NodeJS: 22

Additional context

@ardatan
Copy link
Owner

ardatan commented Jan 3, 2025

Thanks for the details!
Would you create a PR with a failing test?

@iamchanii
Copy link
Contributor Author

@ardatan Sure! #8226

ardatan added a commit that referenced this issue Jan 8, 2025
* Issue reproduction

* Changeset

* ..

* ..

* Update snapshots

* Stabilize snapshots

* More stabilize snapshots

* Enable leak testing for grpc example

* More

---------

Co-authored-by: Arda TANRIKULU <ardatanrikulu@gmail.com>
@ardatan
Copy link
Owner

ardatan commented Jan 8, 2025

Thanks for the PR!
The fix is available in the latest versions! Thanks!

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

Successfully merging a pull request may close this issue.

2 participants