-
-
Notifications
You must be signed in to change notification settings - Fork 566
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
Inconsistency between system scalar type serialize/parseValue methods #254
Comments
As far as I remember it was done in #170. It was actually a valid issue (at least for strings and booleans). A related issue in graphql-js - graphql/graphql-js#771 (yet they seem to fix only string case, not boolean or int). So do you need to accept strings as integer input? |
My trouble is that string is no more accepted as int also int is not accepted as string in parseValue method but with serialize both works. I can submit a PR that show what I'm waiting for if you want? |
Sorry for the long delay with a response, I suggest to send a PR after I merge #248 (hopefully on this weekend) |
This problem should be fixed in #248 as the |
Nice! Thank you @danez 👍 . |
@mcg-web Can you check if the new version (in master) works for you and close if it is OK? |
Hi, after upgrading my project from 0.10 to 0.11 version I get some weird behaviors with system scalar types when using inputs with variables. I don't really get why we have a differents between
serialize/parseValue
methods.Here an example
IntType::parseValue
no more accepts string butIntType::serialize
does:In JS implementation both methods has the same behavior so why in PHP we add these differents?
I override system scalar types to use 0.10 version right now but this is not the best solution... I'm just trying to understand the reason why...
How I override system scalar types without using reflection:
This can maybe helps some people encountering same issue.
The text was updated successfully, but these errors were encountered: