mickhansen / graphql-sequelize

GraphQL & Relay for MySQL & Postgres via Sequelize
MIT License
1.9k stars 172 forks source link

Default to an empty array if arguments is missing #660

Closed lxcid closed 4 years ago

lxcid commented 5 years ago

In my use case, during server side rendering, some how the Apollo client is not returning an AST with arguments for __typename field. This lead to a crash for me, where the program is invoking reduce() on an undefined value.

codecov-io commented 5 years ago

Codecov Report

Merging #660 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #660   +/-   ##
=======================================
  Coverage   91.31%   91.31%           
=======================================
  Files          13       13           
  Lines         426      426           
=======================================
  Hits          389      389           
  Misses         37       37
Impacted Files Coverage Δ
src/simplifyAST.js 92.72% <100%> (ø) :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 bbf74bd...dacfb35. Read the comment docs.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.