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

Resolvers composition not working as described in the docs #4588

Open
1 of 4 tasks
gtuk opened this issue Sep 27, 2022 · 2 comments
Open
1 of 4 tasks

Resolvers composition not working as described in the docs #4588

gtuk opened this issue Sep 27, 2022 · 2 comments

Comments

@gtuk
Copy link

gtuk commented Sep 27, 2022

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

If i try to use resolversComposition it is not working as expected and my console.log inside the composer is not called.

To Reproduce
Steps to reproduce the behavior:

git clone git@github.com:gtuk/graphql-mesh-resolvers-composition-sample-repo.git
cd graphql-mesh-resolvers-composition-sample-repo.git
yarn dev

Run any query e.g query {capsules {id}}
Expected behavior

If i call any query e.g query {capsules {id}} is not showing the console log from the src/add-fields composer

Environment:

  • OS: Linux Mint 20.3
  • "@graphql-mesh/cli": "0.78.24"
  • "@graphql-mesh/graphql": "0.31.17"
  • "@graphql-mesh/transform-resolvers-composition": "0.12.94"
  • "graphql": "16.6.0"
  • NodeJS: v14.17.3 and v16.17.1
@ardatan
Copy link
Owner

ardatan commented Sep 27, 2022

Resolvers Composition doesn't work with GraphQL handler because the gateway forwards the request to the source without applying a resolution logic.

@gtuk
Copy link
Author

gtuk commented Sep 27, 2022

Thanks or the info. Seem i missed it completely or the docs don't mentioned it.
Is there anything similar that i can use instead when the handler is graphql?

@Urigo Urigo mentioned this issue Sep 28, 2022
46 tasks
This was referenced Apr 30, 2024
This was referenced May 7, 2024
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

2 participants