typelevel / grackle

Grackle: Functional GraphQL for the Typelevel stack
http://typelevel.org/grackle/
Apache License 2.0
176 stars 25 forks source link

Fixes for empty SQL sub-objects #519

Closed milessabin closed 10 months ago

milessabin commented 10 months ago

The handling of empty SQL subobjects (previously represented by a context-free singleton EmptySqlQuery) was incorrect in several scenarios.

This showed up in particular in mixed mappings where non-SQL fields were nested in SQL objects. This manifested itself as unexpectedly empty arrays of subobjects, or possibly hit previously unimplemented methods of EmptySqlQuery. Both are fixed by ensuring that SQL ids are included when we, in effect, "join" a SQL with a non-SQL object. EmptySqlQuery is now a non-singleton and has a context and the unimplemented methods have been either implemented or removed.

codecov-commenter commented 10 months ago

Codecov Report

Attention: 16 lines in your changes are missing coverage. Please review.

Comparison is base (b5b703c) 72.39% compared to head (63f8368) 72.48%. Report is 2 commits behind head on main.

Files Patch % Lines
modules/sql/shared/src/main/scala/SqlMapping.scala 84.15% 16 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #519 +/- ## ========================================== + Coverage 72.39% 72.48% +0.08% ========================================== Files 32 32 Lines 4340 4332 -8 Branches 927 951 +24 ========================================== - Hits 3142 3140 -2 + Misses 1198 1192 -6 ```

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