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

fix issue #160: validateVarType parsing numbers #216

Merged
merged 2 commits into from
Apr 10, 2022

Conversation

StevenACoffman
Copy link
Collaborator

@StevenACoffman StevenACoffman commented Apr 10, 2022

This is to fix issue #160, which @f10et ran into as well. Rebased and fixed typo from @f10et in #162

When we find a variable which is json.Number, depending on the variable type request, we'll extract either the Int64 value, or the float value from the json.Number.

This should work well with gqlgen, which uses the json decoder UseNumber function to decode numbers.

https://github.com/99designs/gqlgen/blob/master/graphql/handler/transport/http_get.go#L76

Let me know if I can help make it any better, or if you have any better solution for this problem.

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 this pull request may close these issues.

2 participants