-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Optional Query Arguments Question #32
Comments
This looks like it happens because the incoming query has declared a variable and passed that into the query, but provided no actual query variable for it. The reason I'm doing it this way is to paginate through the results. So I declare |
It should work now, and defaults should work correctly too. The "null" comes from very strong coercion, I wonder if I should just delete that. |
I guess it depends on how closely you want to follow neelance's library. But to me it makes more sense that since its a pointer a nil value means unset versus "null" which would be something set explicitly in the incoming query. |
after that PR it should work like this:
http://facebook.github.io/graphql/draft/#sec-String
I think the float/int coercion makes sense. Null still seems poorly defined. I just found https://github.com/graphql-cats/graphql-cats, I have to find a way to validate against that. |
If a string argument to a query is declared optional its a Pointer type. But it looks like if its not passed in, the generated code marshals it into a string with the value of
"null"
so the pointer is never actually nil. I was doing nil checks to see if a string was sent but this seems to break this as its always set to"null"
.The text was updated successfully, but these errors were encountered: