Closed bellini666 closed 5 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 88.80%. Comparing base (
3481e8d
) to head (da61de8
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This failed to reproduce the issue that I wanted, but I think it is still a good variety for the test suite to have
seems it don't work if class inherit from strawberry.relay.Node
@api_types.interface(models.Dossier)
class Dossier(strawberry.relay.Node):
...
produce AssertionError:
[...]
File "/.../site-packages/strawberry_django/optimizer.py", line 859, in _get_model_hints_from_connection
assert isinstance(n_gql_definition, GraphQLObjectType)
AssertionError
Reviewer's Guide by Sourcery
This pull request addresses issue #550 by optimizing the handling of interfaces in the project. The changes include the addition of a new abstract model
NamedModel
to centralize thename
field, updates to the GraphQL schema to use this new model, and the addition of a new test to ensure the correct functionality of the optimization.File-Level Changes
tests/projects/models.py
tests/projects/schema.py
NamedModel
and updated the GraphQL schema to use a new interfaceNamed
.Tips
- Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - You can change your review settings at any time by accessing your [dashboard](https://sourcery.ai/dashboard): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.