graphql-python / graphene-sqlalchemy

Graphene SQLAlchemy integration
http://docs.graphene-python.org/projects/sqlalchemy/en/latest/
MIT License
974 stars 225 forks source link

WIP: feat: Add contains_exactly filter #391

Open sabard opened 1 year ago

sabard commented 1 year ago

The contains_exactly filter implements relational division, essentially finding entities related to those specified exactly by a search criteria. That is, found entities should have no relations not specified by the search criteria.

contains_exactly was not working with async sqlalchemy 1.4 and was holding up #357, so it was removed. This PR adds back the feature.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 91.55% and project coverage change: -3.25 :warning:

Comparison is base (a03a8b1) 96.37% compared to head (736f10d) 93.13%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## add-filters #391 +/- ## =============================================== - Coverage 96.37% 93.13% -3.25% =============================================== Files 9 10 +1 Lines 773 1296 +523 =============================================== + Hits 745 1207 +462 - Misses 28 89 +61 ``` | [Impacted Files](https://codecov.io/gh/graphql-python/graphene-sqlalchemy/pull/391?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=graphql-python) | Coverage Δ | | |---|---|---| | [graphene\_sqlalchemy/registry.py](https://codecov.io/gh/graphql-python/graphene-sqlalchemy/pull/391?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=graphql-python#diff-Z3JhcGhlbmVfc3FsYWxjaGVteS9yZWdpc3RyeS5weQ==) | `87.71% <75.86%> (-12.29%)` | :arrow_down: | | [graphene\_sqlalchemy/enums.py](https://codecov.io/gh/graphql-python/graphene-sqlalchemy/pull/391?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=graphql-python#diff-Z3JhcGhlbmVfc3FsYWxjaGVteS9lbnVtcy5weQ==) | `94.50% <83.33%> (-3.30%)` | :arrow_down: | | [graphene\_sqlalchemy/types.py](https://codecov.io/gh/graphql-python/graphene-sqlalchemy/pull/391?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=graphql-python#diff-Z3JhcGhlbmVfc3FsYWxjaGVteS90eXBlcy5weQ==) | `89.76% <87.26%> (-4.60%)` | :arrow_down: | | [graphene\_sqlalchemy/filters.py](https://codecov.io/gh/graphql-python/graphene-sqlalchemy/pull/391?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=graphql-python#diff-Z3JhcGhlbmVfc3FsYWxjaGVteS9maWx0ZXJzLnB5) | `89.61% <89.61%> (ø)` | | | [graphene\_sqlalchemy/batching.py](https://codecov.io/gh/graphql-python/graphene-sqlalchemy/pull/391?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=graphql-python#diff-Z3JhcGhlbmVfc3FsYWxjaGVteS9iYXRjaGluZy5weQ==) | `95.34% <94.28%> (+1.59%)` | :arrow_up: | | [graphene\_sqlalchemy/converter.py](https://codecov.io/gh/graphql-python/graphene-sqlalchemy/pull/391?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=graphql-python#diff-Z3JhcGhlbmVfc3FsYWxjaGVteS9jb252ZXJ0ZXIucHk=) | `95.86% <97.15%> (-0.34%)` | :arrow_down: | | [graphene\_sqlalchemy/fields.py](https://codecov.io/gh/graphql-python/graphene-sqlalchemy/pull/391?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=graphql-python#diff-Z3JhcGhlbmVfc3FsYWxjaGVteS9maWVsZHMucHk=) | `98.64% <98.82%> (-0.39%)` | :arrow_down: | | [graphene\_sqlalchemy/\_\_init\_\_.py](https://codecov.io/gh/graphql-python/graphene-sqlalchemy/pull/391?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=graphql-python#diff-Z3JhcGhlbmVfc3FsYWxjaGVteS9fX2luaXRfXy5weQ==) | `100.00% <100.00%> (ø)` | | | [graphene\_sqlalchemy/resolvers.py](https://codecov.io/gh/graphql-python/graphene-sqlalchemy/pull/391?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=graphql-python#diff-Z3JhcGhlbmVfc3FsYWxjaGVteS9yZXNvbHZlcnMucHk=) | `100.00% <100.00%> (ø)` | | | [graphene\_sqlalchemy/utils.py](https://codecov.io/gh/graphql-python/graphene-sqlalchemy/pull/391?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=graphql-python#diff-Z3JhcGhlbmVfc3FsYWxjaGVteS91dGlscy5weQ==) | `96.32% <100.00%> (+2.99%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=graphql-python). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=graphql-python)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.