graphql-platform icon indicating copy to clipboard operation
graphql-platform copied to clipboard

DefaultValue attribute on an input object doesn't get applied (#6897)

Open DaveRMaltby opened this issue 1 year ago • 1 comments

Summary of the changes (Less than 80 chars)

  • The fix for #4677 by #4965 took away the [DefaultValue] attribute's effectiveness on a property of type Optional<T>. To avoid the null reference issue that was occuring in #4677, but still allow for [DefaultVaue] attributes to work, in the From() we check if optional.Value != default

Closes #6897

DaveRMaltby avatar Feb 19 '24 14:02 DaveRMaltby

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 70.44%. Comparing base (1865894) to head (8b7203c).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6922      +/-   ##
==========================================
- Coverage   70.56%   70.44%   -0.12%     
==========================================
  Files        2597     2583      -14     
  Lines      129007   128371     -636     
==========================================
- Hits        91028    90427     -601     
+ Misses      37979    37944      -35     
Flag Coverage Δ
unittests 70.44% <100.00%> (-0.12%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Feb 19 '24 15:02 codecov[bot]