-
Notifications
You must be signed in to change notification settings - Fork 2k
Support for null Enum values in 0.9.5 does not work for arguments #840
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
Comments
(I guess a more accurate title would be that 0.9.5 claimed to add support for |
I can work on a PR for this if some details are fleshed out (it's currently keeping me from upgrading GraphQL for GraphBrainz, unless I change my enum's value back to |
If I understand your issue correctly, seems like there's an oversight here. Your query is indeed valid and should be accepted. |
@wincent I agree! I'm working on a fix for this and have narrowed it down to the |
Uh oh!
There was an error while loading. Please reload this page.
A GraphBrainz test started failing with
graphql-js
v0.9.5 and above. I have an enum like:Note that
FULL
has the valuenull
. (Yes, I had thisnull
valued Enum even before it was 'officially' supported, and simply worked around it by checking for'FULL'
in the resolver.)As of v0.9.5, I'm no longer able to supply
FULL
as an argument, as in this query:This now results in an error from the server:
But clearly
FULL
is a valid enum value there. It seems the newnull
support from #836 didn't extend support to arguments and resulted in breaking what was at least workaround-able.(I can see how this could indeed pose problems for people when determining "no argument provided" vs. "null/undefined enum value provided", but that seems solvable by checking for
'arg' in args
and making suregraphql-js
only populates passed-in args.)The text was updated successfully, but these errors were encountered: