Skip to content

Input object coercion should reject arrays directly #4365

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

Closed
benjie opened this issue Apr 4, 2025 · 0 comments · Fixed by #4367
Closed

Input object coercion should reject arrays directly #4365

benjie opened this issue Apr 4, 2025 · 0 comments · Fixed by #4367

Comments

@benjie
Copy link
Member

benjie commented Apr 4, 2025

If an array is fed into input object coercion it should be rejected directly, rather than passing the object check and then failing on the keys checks.

See this repro:

https://gist.github.com/benjie/58ba75340a85b0da4b403973bea2c5fb

Seems like adding a !Array.isArray(...) check should cover it?

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.

1 participant