strawberry-graphql / strawberry-sqlalchemy

A SQLAlchemy Integration for strawberry-graphql
MIT License
91 stars 26 forks source link

fix: Use lazy type to specialize `Edge`/`Connection` #106

Closed bellini666 closed 9 months ago

bellini666 commented 9 months ago

Use a lazy type to properly resolve and specialize the Edge/Connection types that are created from the model.

The reason we are using a subclass of LazyType is because the original one expects a path to be passed to be used to import it later. We don't have one here, but we do have a mapper containing all the created types that can be retrieved later.

Fix #97

bellini666 commented 9 months ago

@erikwrede @mattalbr can you take a look?

(obs. apparently I can't request review from you, so I'm quoting instead =P)

botberry commented 9 months ago

Thanks for adding the RELEASE.md file!

Here's a preview of the changelog:


Fix a regression from 0.4.0 which was raising an issue when trying to create a connection from the model's relationships.

codecov-commenter commented 9 months ago

Codecov Report

Merging #106 (45049ad) into main (4fa950f) will increase coverage by 0.23%. The diff coverage is 96.55%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #106 +/- ## ========================================== + Coverage 84.05% 84.28% +0.23% ========================================== Files 14 14 Lines 1524 1553 +29 Branches 250 254 +4 ========================================== + Hits 1281 1309 +28 - Misses 191 192 +1 Partials 52 52 ```
codspeed-hq[bot] commented 9 months ago

CodSpeed Performance Report

Merging #106 will not alter performance

Comparing bellini666:forward_refs (45049ad) with main (4fa950f)

Summary

✅ 1 untouched benchmarks