-
Notifications
You must be signed in to change notification settings - Fork 107
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
GraphQL error when not passing value for optional variables #144
Comments
@MichaelDeBoey it was actually a flaw in the library... there's not such thing as "optional variable" in the GraphQL protocol... we'll try to reproduce it in the JS version, but according to https://facebook.github.io/graphql/#sec-Coercing-Field-Arguments (http://take.ms/dAxN1) it's not clear. You can join conversation on gitter, we're just discussing it https://gitter.im/Youshido/GraphQL |
As @viniychuk mentioned, variables don't have default values by themselves - you have to provide a default value for that variable (copied example from here):
Unfortunately as it seems, the library cannot parse this yet. At least when I do this on a query, I do get a parse error:
which corresponds to the whitespace after the variable's type. |
fixed in 1.4.3.4 |
On updating to the newest release, we started getting errors when not passing a value for optional variables
schema:
query:
variables:
response:
The text was updated successfully, but these errors were encountered: