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

Disabling Field Suggestions #686

Open
hoffoo opened this issue Jan 9, 2024 · 0 comments
Open

Disabling Field Suggestions #686

hoffoo opened this issue Jan 9, 2024 · 0 comments

Comments

@hoffoo
Copy link

hoffoo commented Jan 9, 2024

Hello,

We would like to be able to disable field suggestions per this type of vulnerability https://www.acunetix.com/vulnerabilities/web/graphql-field-suggestions-enabled/#:~:text=GraphQL%20Field%20Suggestions%20is%20a,navigate%20the%20API%20more%20effectively.

Looks to me that it is done here

func UndefinedFieldMessage(fieldName string, ttypeName string, suggestedTypeNames []string, suggestedFieldNames []string) string {

Is there currently a way to disable suggestedFields which im not seeing?

If not, would you accept a PR which toggles this? If so would you give me some rough idea on what would be good way to do this? I do not see any kind of configuration option in ValidationContext

It would be very cool if we could do this and also configure disabling introspection in a cleaner way than what we must do here #649

Its worth pointing out that security vendors bring these two up all the with graphql so this will become even more desired as the library grows in popularity.

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