Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

validateVarType always parsing number as float #160

Open
lxy16555 opened this issue Jul 13, 2021 · 0 comments
Open

validateVarType always parsing number as float #160

lxy16555 opened this issue Jul 13, 2021 · 0 comments

Comments

@lxy16555
Copy link

It is known that any number in map[string]interface{} would be parsed as float (even though the required field is Int).
https://github.com/vektah/gqlparser/blob/master/validator/vars.go#L31

So is any struct embeded inside the variables.

Can you add a number parser here so that we can continue using CreateOperationContext() function?

StevenACoffman added a commit that referenced this issue Apr 10, 2022
* fix issue #160: validateVarType parsing numbers

* Fix typo

Signed-off-by: Steve Coffman <steve@khanacademy.org>

Co-authored-by: scboffspring <florian@zysset.me>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant