graphql-hive / graphql-hive/envelop

useMaskedErrors hides error's path

Open
#2,091 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
827
Forks
132
PR merge metrics
No merged PRs in 30d

Description

### Issue workflow progress

_Progress of the issue based on the
[Contributor Workflow](https://github.com/the-guild-org/Stack/blob/master/CONTRIBUTING.md#a-typical-contributor-workflow)_

- [ ] 1. The issue provides a
[minimal reproduction](https://en.wikipedia.org/wiki/Minimal_reproducible_example) available on
[Stackblitz](https://stackblitz.com/fork/node).
- _Please install the latest `@envelop/*` packages that you are using._
- _Please make sure the reproduction is as small as possible._
- [ ] 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 using `useMaskedErrors` plugin - it hides the `path`

![image](https://github.com/n1ru4l/envelop/assets/3340882/659b871e-bef7-4cf2-b28c-34a7926abede)

**To Reproduce** Steps to reproduce the behavior:

add `useMaskedErrors`

```
useMaskedErrors({
errorMessage: 'Oops! Something went wrong.',
}),
```
**Expected behavior**

`useMaskedErrors` to replace only the message, not the `error.path`
![image](https://github.com/n1ru4l/envelop/assets/3340882/f0a1e114-ec96-49cf-97be-44683c0bf5ca)

**Environment:**

- OS: archlinux
- NodeJS: 20
- `@envelop/*` versions:
- `@envelop/core`: `5.0.0`

**Additional context**

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.