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

Can't mock nested field resolvers #4848

Open
2 of 4 tasks
sunesimonsen opened this issue Nov 15, 2022 · 0 comments
Open
2 of 4 tasks

Can't mock nested field resolvers #4848

sunesimonsen opened this issue Nov 15, 2022 · 0 comments

Comments

@sunesimonsen
Copy link

sunesimonsen commented Nov 15, 2022

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 the GraphQL Tools 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

When mocking a nested root query, I can override any simple field, but overriding resolver fields doesn't work.

To Reproduce

Here is a test showing the problem

You can run the test in my fork, or just copy over the test.

Expected behavior

I expect returnStringArgument to have the value Overridden, but I get the default string value Hello World.

Environment:

  • OS: OSX
  • @graphql-tools/mock:
  • NodeJS: v16.18.0

Additional context

I'm trying to fix a problem we are seeing in another tool graphql-fakester

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