Open Grmiade opened 2 years ago
Would you create a PR for this failing test :)
@ardatan Schema wrap not only transforms the swallow location but also swallows the original error type somehow. Stitching is the same. Also, all regular errors (e.g. throw new Error("Should be redacted")) are considered GraphQLError, which means that Error Masking in Yoga v3 doesn't work. Below are my versions.
"graphql": "~16.6.0",
"graphql-tools": "~8.3.14",
"graphql-yoga": "~3.1.1",
Describe the bug
The
wrapSchema
function transforms the response when error path is not provided. Currently,@apollo/gateway
doesn't provide this top-level path, so when we wrap a federated graph, responses with errors are not handled correctly.See https://github.com/apollographql/federation/issues/354
To Reproduce
Here a test suite to reproduce the issue:
Current behavior
When the error doesn't provide the path, we receive:
Is this behavior is wanted?
Expected behavior
We should probably receive:
Environment
Thanks in advance 🙏 Let me know if you need more details.