-
Notifications
You must be signed in to change notification settings - Fork 467
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
Fixes #1617: Federation Enum not parsing value 0 #1618
Conversation
@postman-nz: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/ |
I'm working on the CLA, just need to confirm with my employer that it's ok to sign. |
@postman-nz We ran into the same issue with our Federations, did you get around to signing the CLA so the PR can proceed? |
@marjorg Yes I have signed the CLA, and completed all the requirements for the PR to pass. As a workaround, we hard coded all our 0 enum values to -1 (assuming -1 isn't being used), and in our resolvers added a check: Which works for now, but it's not a long term solution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no context here but the fix looks straightforward.
Hi @JakeDawkins and @jbaxleyiii, Is there anything else I have to do to get this PR completed? (I'm new to contributing to public repos, so not 100% sure on the process) Thanks! |
Hey @postman-nz! So sorry for letting this slip through the cracks. Everything looks good to me! Can you rebase this branch off master? My |
Updated buildSchemaFromSDL to handle Enums with a value of 0. Previously, when an enum had a value of 0, the name would be used as the enum value. Added a unit test to ensure 0
No problem mate! I have rebased with master (I hope 😄). Let me know if there is anything else you'd like me to do. |
Fixes #1617
Updated buildSchemaFromSDL to handle enums with a value of 0. Previously, when an enum had a value of 0, the name would be used as the enum value.
Added a unit test to ensure 0 is parsed correctly.
TODO: