mattkrick / cashay

:moneybag: Relay for the rest of us :moneybag:
MIT License
453 stars 28 forks source link

getMissingRequiredVariables report missing falsy yet valid values #164

Closed theobat closed 7 years ago

theobat commented 7 years ago

Hi @mattkrick,

I found a problem while trying to query something containing a floor in a very basic form. Floor is expected to be a non null Int but very often equals 0. I found out that the falsy values are not handled in getMissingRequiredVariables. This PR solves the problem by specifically looking for null or undefined.

Edit: coverage decreases because the queryHelpers.js file was not in the tests percentage before and I only test one of the few functions of the file

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-4.01%) to 72.388% when pulling 1d972080ed67d2e301df8916b9f2e06a13e8a39f on theobat:master into da2e138fc44ea7ff6bec5cec56ab1e141b417751 on mattkrick:master.

theobat commented 7 years ago

Also if you don't have time to review this in the near future please let me know so that I use my fork as a dependency instead. Thanks. @mattkrick