forked from ardatan/graphql-mesh
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: optionally mask parse and validation errors (ardatan#1351)
* feat: mask parse and validation errors * Update .changeset/light-eagles-promise.md * feat: rename config option + add context * Apply suggestions from code review
- Loading branch information
Showing
7 changed files
with
145 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
'@envelop/core': minor | ||
--- | ||
|
||
allow masking validation and parse errors with `useMaskedErrors`. | ||
|
||
```ts | ||
useMaskedErrors({ | ||
handleParseErrors: true, | ||
handleValidateErrors: true, | ||
}); | ||
``` | ||
|
||
This option is disabled by default as validation and parse errors are expected errors that help the API consumer instead of leaking secret information. | ||
|
||
If you want to avoid leaking schema suggestions, we recommend using persisted operations. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@envelop/core': minor | ||
'@envelop/types': minor | ||
--- | ||
|
||
add `setResult` to `AfterValidateEventPayload` for altering the validation errors. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters