Fixes #1617: Federation Enum not parsing value 0#1618
Fixes #1617: Federation Enum not parsing value 0#1618JakeDawkins merged 3 commits intoapollographql:masterfrom
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. |
lilyball
left a comment
There was a problem hiding this comment.
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: