apollographql / apollo-link-state

✨ Manage your application's state with Apollo!
MIT License
1.4k stars 100 forks source link

Fix field not found when alias field resolve falsy #337

Closed trungtin closed 5 years ago

trungtin commented 5 years ago

When aliasedNode resolve falsy value (0, false, null) and preAliasingNode resolve undefined then the error field not found appears, this should fixes it.

apollo-cla commented 5 years ago

@trungtin: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/

trungtin commented 5 years ago

close as duplicate of #303

codecov-io commented 5 years ago

Codecov Report

Merging #337 into master will increase coverage by 0.12%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #337      +/-   ##
==========================================
+ Coverage      95%   95.12%   +0.12%     
==========================================
  Files           2        2              
  Lines          80       82       +2     
  Branches       22       22              
==========================================
+ Hits           76       78       +2     
  Misses          1        1              
  Partials        3        3
Impacted Files Coverage Δ
packages/apollo-link-state/src/index.ts 93.84% <100%> (+0.19%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 34774d8...f7ecf7a. Read the comment docs.