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

@escape.tech/graphql-armor-block-field-suggestions leaves an extra ? after masked suggestion #729

Open
kallja opened this issue Oct 30, 2024 · 2 comments · May be fixed by #730
Open

@escape.tech/graphql-armor-block-field-suggestions leaves an extra ? after masked suggestion #729

kallja opened this issue Oct 30, 2024 · 2 comments · May be fixed by #730

Comments

@kallja
Copy link

kallja commented Oct 30, 2024

The @escape.tech/graphql-armor-block-field-suggestions package does what it promises. However, when masking suggestions, it leaves the leading whitespace and trailing question mark in place. I.E. the original unmasked message Cannot query field "i" on type "Node". Did you mean "id"? becomes Cannot query field "i" on type "Node". [Suggestion hidden]? without overriding the default mask. When mask is overridden with the empty string the result message is Cannot query field "i" on type "Node". ?.

I'd expect outputs of:

  • Cannot query field "i" on type "Node". [Suggestion hidden] with default settings
  • Cannot query field "i" on type "Node". with mask overridden with the empty string
@kallja
Copy link
Author

kallja commented Oct 30, 2024

If you're open to including this change (IMO an improvement, obviously), I'd be happy to contribute a PR implementing it.

@nullswan
Copy link
Member

Sure! Looking forward the contribution @kallja :)

@kallja kallja linked a pull request Oct 30, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants