Closed ManiacMaxo closed 1 week ago
I've implemented a possible solution here. Another possibility is to ignore interface types altogether during optimisation
Hey @ManiacMaxo ,
Thanks for that!
I think your solution is great! Would you like to open a PR for that?
Hey @ManiacMaxo ,
I tried writing a test using interfaces, but everything passed: https://github.com/strawberry-graphql/strawberry-django/pull/554
What should we do to reproduce the issue to go together with your fix to make sure that doesn't regress in the future?
Hi @bellini666,
Unfortunately I couldn't recreate the issue without using django-polymorphic (which is why I'm using interfaces) since it returns the interface type's model which can be cast into all concrete types
Querying interfaces crashes when using the optimiser extension caused by #537.
Describe the Bug
Any field that is an interface will raise an assertion error when queried.
disable_optimizations=True
has no effect. This is caused by the new implementation which usesschema.schema_converter.from_object
that only supports concrete objects - not interfaces.System Information
Upvote & Fund